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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending email with both body and attachment - How? 1

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Hello!

I use uuencode to send attachement on my emails. I now have the need to send a report via email in both text and excel. The excel format will go as an attachment; the text should be the body of the email.

How can I do this?

SCO UNIX 3.2v5.0.6 using 'sendmail' ...

Thank you all in advance!


Jose Lerebours
KNOWLEDGE: Something you can give away enlessly and gain more of it in the process! - Jose Lerebours
 
Something like this:

[tt](
cat << HERE
This is the email text.
HERE
uuencode filename.xls filename.xls
) | mail -s &quot;subject&quot; recipient@machine[/tt] Annihilannic.
 
Annihilannic,

What you post seems interesting; thank you! I will put it into practice.

I understand it as, given two files TEXT.txt and CSV.csv
I would:

(
cat /tmp/TEXT.txt
uuencode /tmp/CSV.csv
) | mail -s &quot;Body and attachment&quot; receipient@machine

Regards;


Jose Lerebours

KNOWLEDGE: Something you can give away enlessly and gain more of it in the process! - Jose Lerebours
 
Precisely. Hoewever uuencode requires two parameters unless you're reading the file's contents from stdin. Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top