943,685 Members | Top Members by Rank

Ad:
Aug 2nd, 2008
0

Email attachment and add text inside the mail

Expand Post »
Hi All

Anyway to add a note inside the email saying here is your file after attching a file in unix??

For example my script is fine attaching the excel file but i would like a message inside the mail too and not in the subject title.

Quote ...
/usr/bin/uuencode $adhocreport $adhocreport | /usr/bin/mailx -s "$subject" $destination
Reputation Points: 10
Solved Threads: 0
Light Poster
skelly16 is offline Offline
34 posts
since Aug 2007
Aug 2nd, 2008
0

Re: Email attachment and add text inside the mail

should be a parameter to add content in mailx
have you looked at the manpage?
Moderator
Featured Poster
Reputation Points: 183
Solved Threads: 89
Posting Virtuoso
DimaYasny is offline Offline
1,772 posts
since Jan 2007
Aug 3rd, 2008
0

Re: Email attachment and add text inside the mail

Click to Expand / Collapse  Quote originally posted by DimaYasny ...
should be a parameter to add content in mailx
have you looked at the manpage?

Sorry i have looked and cant find anything which would do this. If i try echoing this stop the mail attachment etc, also i dont want the message inside the subject line.

Im trying to achieve something like this

Quote ...
to: joe.bloggs@hotmail.com
subject: Report of Adhoc

mailattachment.xls

Please find the report above etc blah blah.
Now everything works apart i dont know how to add comments after i have attached the excel file.
Reputation Points: 10
Solved Threads: 0
Light Poster
skelly16 is offline Offline
34 posts
since Aug 2007
Aug 3rd, 2008
0

Re: Email attachment and add text inside the mail

Moderator
Featured Poster
Reputation Points: 183
Solved Threads: 89
Posting Virtuoso
DimaYasny is offline Offline
1,772 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: helps with getopts
Next Thread in Shell Scripting Forum Timeline: output of echo command has an unwanted newline character





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC