Analog has asked for the wisdom of the Perl Monks concerning the following question:
Here is pretty much what I have
my $message = MIME::Lite->build ( From =>'someemail, To=>'anotheremail, Subject=>'somesubject', Type =>'multipart/alternative' ); if ('i have a attachment') { $message->replace(Type => 'multipart/mixed'); $message->attach( Type=> 'AUTO', Path=> $upload_file, Filename=>$basename, Disposition => 'attachment' ); } $message->attach(Type=> 'TEXT', Data=> $text ); $message->attach(Type=> 'text/html', Data=> $html ); $message->send('smtp','000.000.000.000',Debug=>1,Timeout=>60,Port=> +26);
Currently with the above I always get a HTML/Text, but not the attachment. If I create/build the MIME::Lite object with "multipart/mixed", I will get the attachment but only the text version comes through (and the HTML is a 2nd attachment). It doesn't seem to matter how I create the MIME::Lite object (using new or build)
I feel like I just missing something stupid, but I have no idea what.
Any ideas? TIA!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite and Multipart
by zwon (Abbot) on Sep 29, 2009 at 19:04 UTC | |
by Analog (Novice) on Sep 29, 2009 at 21:20 UTC | |
by zwon (Abbot) on Sep 29, 2009 at 22:43 UTC | |
by Analog (Novice) on Sep 29, 2009 at 23:29 UTC | |
by jakobi (Pilgrim) on Sep 30, 2009 at 00:08 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 21:49 UTC | |
by zwon (Abbot) on Sep 29, 2009 at 22:28 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 23:01 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 19:53 UTC | |
by zwon (Abbot) on Sep 29, 2009 at 20:06 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 20:13 UTC | |
|
Re: MIME::Lite and Multipart
by jakobi (Pilgrim) on Sep 29, 2009 at 15:48 UTC | |
by Analog (Novice) on Sep 29, 2009 at 17:35 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 17:53 UTC | |
by Analog (Novice) on Sep 29, 2009 at 18:55 UTC | |
by jakobi (Pilgrim) on Sep 29, 2009 at 19:38 UTC | |
|