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

Attaching file to email...

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Does anyone know of a good method to send attachments via email? I tried getting my host to install MIME::Lite, but they wouldn't cos it screwed up something else on their server.

Any help is much appreciated.

Cheers

Andy
 
The following ksh code works for me on Solaris, it should be easily adaptable.


echo "Subject: My Message" > $msgfile
echo "Encoding: 8 TEXT, 32 UUENCODE" >> $msgfile
echo "X-MS-Attachment: WINMAIL.DAT 0 00-00-1980 00:00" >> $msgfile
echo "Content-Type: multipart/mixed" >> $msgfile
echo "Some explanatory text" >> $msgfile
uuencode `basename $tarfilez` < $tarfilez >> $msgfile
mail $recipient < $msgfile
 
Anyone know how to adapt this? I havn't the first clue about KSH :(

Cheers

Andy
 
Have a look on search.cpan.org, there's a number of e-mail modules available on there.

I have a feeling they sold you a kipper on &quot;... it screwed something else up...&quot;, they'd know exactly what screwed up, and should have rectified any bogus modules rather than backing out

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top