CHeighlund
Programmer
I've been working with a program in perl, mostly copied from another written by my predecessor, which is designed to automatically email a set of files to various employees for our main customer.
To now, the only real 'output' anyone running the program has seen was 'Emailing [address]', printed right before the call to the email subroutine. As these were intended to be automated, this has never been a problem before. My boss, however, ran the program manually earlier today, and wants some kind of proof that the message and related files have been sent.
What do I need to do in my code in order to catch the return value (assuming a true/false return; I may be incorrect here) from the MIME::Lite->send() command? Actual code involved is
where $msg is set as MIME::Lite->new.
To now, the only real 'output' anyone running the program has seen was 'Emailing [address]', printed right before the call to the email subroutine. As these were intended to be automated, this has never been a problem before. My boss, however, ran the program manually earlier today, and wants some kind of proof that the message and related files have been sent.
What do I need to do in my code in order to catch the return value (assuming a true/false return; I may be incorrect here) from the MIME::Lite->send() command? Actual code involved is
Code:
MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;