Email attachment and add text inside the mail

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 34
Reputation: skelly16 is an unknown quantity at this point 
Solved Threads: 0
skelly16 skelly16 is offline Offline
Light Poster

Email attachment and add text inside the mail

 
0
  #1
Aug 2nd, 2008
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.

/usr/bin/uuencode $adhocreport $adhocreport | /usr/bin/mailx -s "$subject" $destination
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,765
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 85
Moderator
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Email attachment and add text inside the mail

 
0
  #2
Aug 2nd, 2008
should be a parameter to add content in mailx
have you looked at the manpage?
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 34
Reputation: skelly16 is an unknown quantity at this point 
Solved Threads: 0
skelly16 skelly16 is offline Offline
Light Poster

Re: Email attachment and add text inside the mail

 
0
  #3
Aug 3rd, 2008
Originally Posted by DimaYasny View Post
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

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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,765
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 85
Moderator
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Email attachment and add text inside the mail

 
0
  #4
Aug 3rd, 2008
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC