Slashdot Mirror


Sending E-mail Attachments From NT Command Line?

Losing my love of PERL asks: "OK, here's the skinny: I've been trying to figure this out for quite a while now, and nothing is working. I need to send a proper e-mail attachment (i.e. something that will show up as a paper clip in Outlook) from an NT command line to be called by a PERL script (or better yet, just sent by the script). I've tried several modules and programs, including Blat, Mail::Sender, Mail::Sendmail, but every time the attachment is just shoved into the body of the e-mail. Does anyone have a solution to my problems?"

1 of 12 comments (clear)

  1. Mail::Sender by Matts · · Score: 3

    Firstly, Outlook sometimes puts the attachment in the body. That's just how it works. If you don't want it to happen you'll have to specify a MIME type it doesn't recognise, or zip up your file. It will do this with HTML or text attachments. Netscape Messenger does the same thing.

    Having said all that, Mail::Sender works extremely well, even if the code is a bit spaghetti-ish. And does attachments just fine.

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.