in reply to Re^5: How can I send email with attachments if MIME::Lite isn't available?
in thread How can I send email with attachments if MIME::Lite isn't available?
Thats just it Dave, there are no errors, The script works find, It just would send any thing. Look, heres a part of my code
require "Lite.pm"; $msg = MIME::Lite->new( To =>$sendtoemail, From =>$useremail, Cc =>$useremail, Subject =>'You got a webcard!', Type =>'multipart/related' ); push (@attachments, [ Type => 'image/gif', Id => 'mygreeting', Path => "$real_imagepath/$greeting", ]); if ($no_thumb eq "ON") { $mtext .= <<EOX; <center> Here's <i>my</i> image:<br> <img src="cid:mythumb"> </center> EOX push (@attachments, [ Type => 'image/gif', Id => 'mythumb', Path => "$real_imagepath/$thumb", ]); } if ($no_image eq "ON") { $mtext .= <<EOX; <center> Here's <i>my</i> image of you:<br> <img src="cid:myimage2"> </center> EOX push (@attachments, [ Type => 'image/jpg', Id => 'myimage2', Path => "$real_imagepath/$image", # filename => "$image", # Disposition => 'attachment' ]); } if ($no_photo eq "ON") { $mtext .= <<EOX; <center> Here's <i>my</i> image of you:<br> <img src="cid:photo"> </center> EOX push (@attachments, [ Type => 'image/jpg', Id => 'photo', Path => "$real_imagepath/$photo", # filename => "$photo", # Disposition => 'attachment' ]); } $msg->attach(Type => 'text/html', Data => "<body>\n" . $mtext . "</body>\n"); foreach $attachment (@attachments) { $msg->attach(@$attachment); } $str = $msg->as_string; $msg->print(\*SENDMAIL); $msg->send ('sendmail', '/usr/lib/sendmail -t');
<code> tags added by davido per consideration.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How can I send email with attachments if MIME::Lite isn't available?
by davido (Cardinal) on Jun 23, 2005 at 01:03 UTC | |
by bigjoe11a (Novice) on Jun 23, 2005 at 02:09 UTC | |
|
Re^7: How can I send email with attachments if MIME::Lite isn't available?
by Anonymous Monk on Jun 23, 2005 at 01:13 UTC |