That would be a perfectly acceptable way of doing what you're trying to do. Perhaps if you told us what the error was, we could help you.
If you're not on a Unix system or otherwise don't have the standard "sendmail" program to handle your 'send' request, the MIME::Lite documentation recommends something like this instead:
MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60);
$msg->send;
Otherwise, you're going to have to be a lot more verbose and specific about the problem you're having. |