in reply to mime::lite Problem
To try and find out what is causing the problem, try dumping the 'non-sent' mail to a file:my $mail = MIME::Lite->new(Subject => 'some_subject', Type => 'multipart/mixed'); # non MIME::Lite code here... my $msgBody = "some foo message"; $mail->attach(Type => 'TEXT', Data => $msgBody); #more non MIME::Lite code here... for my $attachment (@attachments) { my ($filePath, $fileName) = split (/:/, $attachment); $mail->attach(Type => 'application/octet-stream', Path => $filePath, Filename => $fileName, Disposition => 'attachment'); }
The attachments should be base64 encoded, so you could try parsing the dumped file and use MIME::Base64 to decode the attachments and dump them to files. Then you can check to see if all attachments are complete. If they are then you know it's not your code or MIME::Lite that's the problem and can start looking at sendmail as the culprit.# necessary file opening code here... print SOME_FILEHANDLE $mail->as_string;
|
|---|