ttcberat, how many attachments are we talking about? I send 3 spreadsheets as attachments using code not too dissimilar to the following:
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'); }
To try and find out what is causing the problem, try dumping the 'non-sent' mail to a file:
# necessary file opening code here... print SOME_FILEHANDLE $mail->as_string;
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.

That idea is completely untested by the way so the usual YMMV disclaimer applies ;-)

-- vek --

In reply to Re: mime::lite Problem by vek
in thread mime::lite Problem by ttcuberat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.