in reply to Re^3: MIME::Lite and Multipart
in thread MIME::Lite and Multipart

I understand and thank you guys for the help - I don't know if I agree though, IMO I don't think its right to need to create 2 separate :Lite objects, because if there is no attachment then I need to add the "To", "From", "Subject" keys to that "$alternative" object.

I'm not going to complain though, MIME:Lite is a excellent module and I'm lucky it exists.

Replies are listed 'Best First'.
Re^5: MIME::Lite and Multipart
by jakobi (Pilgrim) on Sep 30, 2009 at 00:08 UTC

    shouldn't you only add To:, Subject:,... to the outermost ::Lite object :)? You insert the alternative ::Lite object into the outer ::Lite object just to get the MIME hierarchy. To:, ... is only used for the mail header, and that only makes sense with the outer ::Lite object finally being mailed (i.e. $message). So you better agree with zwon :)

    For more info on the mail format and smtp: Check out the original rfc822 and maybe its updates and MIME extension updates for more on the actual email format. Or look at an mbox file on a unix box. As you have an smtp service active, try talking to it with telnet localhost 25 and smtp/esmtp commands (unless the mailer's secured/paranoid even against localhost; maybe strace/truss the mailer process)