in reply to Email error checking

Interesting to see someone just down the road from me visiting the Monastery :).

I'm probably completely missing the point, but it looks like you could simply use an if to check the result from the send like this:

if (! $msg->send('smtp', 'smtp.taieriprint.co.nz')) { # handle bad send here }

The other part if the problem would seem simply that you should chuck the email body into a string rather than embedding it as a parameter so you get $msg->attach(Type => 'text/html', $body); and have $body available to write out to a file if you need to.

If this doesn't answer your actual problem, you better show us an error message or some other information about the way your script is failing.


Perl is Huffman encoded by design.