|Welcome to the Monastery|
Re^3: MIME::Lite and Multipartby jakobi (Pilgrim)
|on Sep 29, 2009 at 17:53 UTC||Need Help??|
Hmm. I kind of ignored the 'no data', as I HAD PROPER data/mails and no errors as soon as I had your scrap working with the bits you omitted.
below is postfix' impression of 2 runs of your code
Actually this doesn't happen, if you comment out the attachment block: it sends a proper email.
With the attachement code, you see some debug output and the 'no data' at the very point my postfix reports loss of connection. What happens is that ::Lite happily emits a mail header, blank line and possibly the text and html variable content as mime parts (you did set them, right?). Which are the first 500 or so bytes of the partial message.
However, ::Lite doesn't check in advance that it can create a proper email and it is NOW ::Lite aborts IF THE ATTACHEMENT FILE doesn't exist(?) or is undef(your scrap!). Which is what postfix is unhappy about and thus postfix rejects the already received partial mail as well.
So with the variables being undef, I of course did never see a mail nor the exact problem scenario you have. With the missing bits added all I see is proper mails and no problems at all.
Summary: use strict; use warnings; use diagnostics; would have pinpointed the trouble for both of us: the undefined (or not found?) $upload_file among others, which lead to your 'no data' observation. Also testing the rc of the send operation would have made the issue more obvious.
needless to say, I also did the mistake to test the code w/o the use strict; ...