in reply to Mime::lite "no data" error again

Psychodead:

Dubious guess: Perhaps it's whining about not having a message body? If there were a single attachment, it might be using it as the body.

You might also check the case of your keys: The MIME::Lite doc shows "Cc" rather than "CC", so you may be missing bits of your EMail.

...roboticus

Replies are listed 'Best First'.
Re^2: Mime::lite "no data" error again
by Psychodead (Initiate) on Dec 09, 2009 at 17:06 UTC
    Eeerm... Yeah, could be that somehow it has no content data. I made another MIME::Lite-Object, where I put my attachments. Then I attached this one to my $msg. Donīt ask me why, but it works! Looks like this:
    $part_content = MIME::Lite->new( Type => 'text/plain', Data => $text_mail, Encoding => 'quoted-printable', ); $part_content->attach( Type => 'application/pdf', Data => $pdf, Filename => q(buchung_).$token.q(.pdf), Disposition => 'attachment' ); # and then: $msg->attach($part_content); $msg->send || print "you DON'T have mail!";