Yes, after seeing "premature end of scripts headers" for a long while, and _not_ knowing where it crashes, has been very fustrating. Now I can see warning messages, and for testing the email, I can see ALL the echos back from the email server.
However I must say that I strongly discourage hand generating SMTP mails. Use MIME::Lite instead. Let it do the work of making sure things are set up correctly.
Although the Net::SMTP has been working 100% okay for a small Perl script (about 170 lines, most of it email 'body'), when I added it to a much larger Perl script, as a sub routine, it is not working all the time. From the 'logs', the email server is talking okay, and I should get all the emails back, but I don't. On the converse, the 'feedback' form, which uses FormMail.pl and the CGI::NMS::Mailer::SMTP modules, it works 100% on 2 domains ??
So, there is something strange happening with Net::SMTP, and because the emails are online order confirmations, I _really_ need them ALL to come to me first. I had a quick look at MIME:Lite, it looks very easy to use. We have Perl 5.61, so I hope it is installed, so that I can test it. The emails I'm sending aren't complex (attachments will be later), they are just a few standard email headers, and the body is a mixture of 'fixed' text, plus some text created from some MySQL work.
Thanks, :)
Peter
In reply to Re: Re: Re: Re: Net::SMTP and debugging ?
by peterr
in thread Net::SMTP and debugging ?
by peterr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |