Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Subject, Body and Attachement in sendmail 1

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

currently we're using the following ways to send emails using sendmail (mail command):

Code:
echo "This is the mail body text" | mail -s "This is the subject" user@target.com

-> This way we're able to send a mail containing Subject and Body Text ...

Code:
uuencode Attachement.txt < somecontent.txt > mail.att
mail -s "Subject" user@target.com < mail.att

-> This way we're able to send a mail containing Subject and File Attachement.

However so far we've been unable to combine these two ways so that we're able to send emails containing Body Text as well as (!) File Attachement.

How could this be done ?

Regards,
Thomas
 
who needs a dog (mutt) when you already have a cat ;-)

Code:
(cat Body.txt
 uuencode Attachment.txt < SomeContent.txt)|\
mail -s "Subject" user@target.com

HTH,

p5wizard
 
Perfect !
Thanks a lot :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top