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

Attachments in mail using Net::SMTP?

Status
Not open for further replies.

Goku81

Programmer
Mar 27, 2001
34
0
0
US
I have mail scripts written using SMTP but don't know how to send attachments. I just need to see if it can be done and what the code is if this can be done.
 
You can do this, but if you're using the Net::SMTP module alone, it's quite the pain. You need to encode your attachments in Base64, create unique delimiters in your message, and set the content type to multipart. Better to pick a different module -- I recommend MIME::Lite. You can get it off of CPAN of course.

Good luck,

brendanc@icehouse.net
 
Hey friend,
thanks for the advice but I forgot to mention I'm doing all of this from an NT box. that's what I have running the perl interpreter. IS Mime::Lite indepedent of OS? I know some of these mail modules I can't use cause I'm not running this stuff from a UNIX box
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top