10-11-2006
Quote:
Originally Posted by ghostdog74
it does not work, so give the error messages you encountered.
Also, did you even try to see what usr/bin/ is on the shell command line??
the actual command might be
/usr/bin/cat file.txt | mailx .........or something similar..
When I use the following command at command prompt it is working.
uuencode filename filename | mail "mail_id".
but when I use in the script it is not working and giving the error
SP2-0734: unknown command beginning "/usr/bin/u..." - rest of line ignored.
before this i open sql connection.I have to close this conncetion before using this command.i will check it.
again problem.
when i use
uuencode "filename" | mailx -s "subject" "mail_id".
it is showing subject but it is not attaching the file to the mail
when i use
uuencode "filename" | mail -s "subject" "mail_id".
it is attaching file but subject is not showing in mail.b'se sun solaris 5.9 does not allow mail command to show subject.
how to do it.
Last edited by Mar1006; 10-11-2006 at 06:47 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to know how to send a mail in unix using mailx or mail or sendmail to send a mail with a file attached. I have read the answers from the other threads but I still don't understand. I want to do it in the command line as well as in script.
Can anyone help? DO I need to use... (1 Reply)
Discussion started by: firebirdonfire
1 Replies
2. Shell Programming and Scripting
Hi,
I need to attach a txt file while sending mail thru Unix.
Please help me out in this..
-Charan. (9 Replies)
Discussion started by: charan81
9 Replies
3. Shell Programming and Scripting
I need a shell script which checks for a file in a particuler folder and should send me a mail if the file of that name is present.
Please help me on this.I am new to shell scripting. (6 Replies)
Discussion started by: jayaramanit
6 Replies
4. UNIX for Advanced & Expert Users
Hi
i am looking for the script which can send file to different mailids, please halp me out.
Thanks in advance. (3 Replies)
Discussion started by: vpandey
3 Replies
5. Shell Programming and Scripting
How to attach a file in Linux mail command
Hi Guys,
Is there any way to attach a file in Linux mail command without using "uuencode"?
i.e.
Code:
file=/a/b/c/d/file.txtmail -s "Giga aks" abc@123.com <<HDoc`uuencode $file $file 2>/dev/null`HDoc
Here, I don;t want to use 'uuencode'... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies
6. Shell Programming and Scripting
Hello,
I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line".
Thanks (4 Replies)
Discussion started by: sfetea
4 Replies
7. Shell Programming and Scripting
Hi,
i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall:
I want to send two attachments -ahmed.csv and ahmed1.csv .
Sample content:
<html>
<body>
<b> Hi...</b>
</body>
</html>
... (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies
8. Shell Programming and Scripting
Hi Experts,
i need your help here
:confused:
Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell.
Thanks in... (9 Replies)
Discussion started by: newbieabc
9 Replies
9. Shell Programming and Scripting
ENVIROMENT
Linux: RHEL 6.4
Log Path: /usr/iplanet/servers/https-company/logs
Log Format: user.log.03-15-2015
I have log4j log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies
10. Shell Programming and Scripting
Hello Folks,
I am looking for the script which will go to directory and check for the latest 5 files and send a mail to attaches these files to user.
Kindly guide.
Regards (7 Replies)
Discussion started by: sadique.manzar
7 Replies
LEARN ABOUT DEBIAN
mime-tool
MIME message tool(1) General Commands Manual MIME message tool(1)
NAME
mime-tool - a simple program to construct MIME messages with attached files
SYNOPSIS
mime [ -dDvV ] [ -S subject ] [ -F from-address ] [ -T to-address ] [ -C carbon-copy address ] [ -P prolog-text ] [ -E epiplogue-text ] [
-B boundry ] [ -O overall content-type ] { [ -78abiquxopm ] [ -t content-type ] filename }
DESCRIPTION
The mime program constructs MIME messages with attached files. The user can specify the content type (application/octet-stream, text/plain
or a user specified type), content type encoding (7bit, 8bit, binary, base64 and auto-detect), content disposition (attached or inline) and
the content boundry string. The user can also specify some mail related options: subject, from-address, to-addres, carbon-copy addres,
prolog-text and epilog-text.
The output of the MIME-tool program can be sent directly to the mail, mailx or sendmail commands (or any other command that accepts RFC-822
formatted messages).
NOTE: Specifying 7-bit encoding for an attachment that contains 8-bit data will convert any data bytes whose high-bit is set to question
marks.
OPTIONS
-7 7-bit ASCII encoding
-8 8-bit ASCII encoding
-a application/octet-stream content type
-b binary encoding
-d low detail debugging
-D high detail debugging
-s write a subpart
-i disposition: inline (instead of attachment)
-q quoted-printable encoding
-c content-type
explicit content type
-t text/plain content type
-o omit disposition line
-u unknown encoding, auto-detect
-v verbose messages
-V very verbose messages
-x base64 encoding
-p copy existing MIME part
-o omit content-disposition
-m omit content-transfer-encoding
-n filename
override the filename in the disposition header
-N don't add a filename parameter in the disposition header
-0 no-op
EXAMPLES
Using MIME-tool to write a mail message to a file:
mime -S "test message" -F me@foo.net -T someone@somewhere.net file1 > test.msg
Using MIME-tool with the mail command:
mime -S "test message" -F me@foo.net file1 | mail someone@somewhere.net
Using MIME-tool with the mailx command:
mime -S "test message" -F me@foo.net file1 | mailx someone@somewhere.net
Using MIME-tool with the sendmail command:
mime -S "test message" -F me@foo.net file1 | sendmail someone@somewhere.net
VERSION
This is version 1.5.topal3 from June 2009.
KNOWN BUGS
Most of the header values are not properly quoted or folded, so long or complex values for these headers may cause problems. Specifically,
the from-address, to-address, carbon-copy-address and content-type headers may not be properly quoted or folded.
For some reason, certain e-mail clients (espcially from a large software company located in Redmond, Washington) don't seem to recognize
file attachments as attachments, but instead displays them as inline attachments. (maybe this isn't MIME-tool's fault, but I've gotten a
few e-mails about it, so I'm mentioning it here)
AUTHOR
mime is written by Jeffrey Dutky <dutky@bellatlantic.net>
Oscar Esteban spotted an off-by-one error in the base64 encoding function.
Sergey Lapin spotted a bug in the filename header construction.
Chris Hemphill noticed that the documentation (this manual page and the README file) didn't include any examples of how to call the program
with common mail commands.
Some additional fixes and additions by Phil Brooke to support Topal.
AVAILABILITY
The original MIME-tool package can be downloaded from my web page at http://members.bellatlantic.net/~dutky
This modified version is distributed with Topal:
http://homepage.ntlworld.com/phil.brooke/topal/
MIME tool mime MIME message tool(1)