Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: MIME::Lite not including Attachments

by steve (Deacon)
on Feb 11, 2010 at 15:57 UTC ( #822674=note: print w/replies, xml ) Need Help??


in reply to MIME::Lite not including Attachments

Perhaps you should try using a content type of multipart/mixed.

The following example is an excerpt from MIME::Lite.

Create a multipart message (i.e., one with attachments) and send it SMTP
### Create a new multipart message: $msg = MIME::Lite->new( From => 'me@myhost.com', To => 'you@yourhost.com', Cc => 'some@other.com, some@more.com', Subject => 'A message with 2 parts...', Type => 'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach( Type => 'TEXT', Data => "Here's the GIF file you wanted" ); $msg->attach( Type => 'image/gif', Path => 'aaa000123.gif', Filename => 'logo.gif', Disposition => 'attachment' ); ### use Net:SMTP to do the sending $msg->send('smtp','some.host', Debug=>1 );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://822674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-01-26 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?