|Perl: the Markov chain saw|
email::stuffer not always sending messagesby Brian4321 (Initiate)
|on Apr 29, 2020 at 20:09 UTC||Need Help??|
Brian4321 has asked for the wisdom of the Perl Monks concerning the following question:
I have Perl scripts running 24x7 on three different severs. The scripts perform different functions, such as importing data, creating reports, etc. However, the last thing each script does is send me an e-mail alert using the email::stuffer CPAN module. Here is a snippet of the code:
One of the scripts has been running since 2006 on a windows server. Another since approximately 2014 on a linux server and the third script was created in October 2018 on a windows server. Therefore, the CPAN versions are different. I.E. the CPAN versions on the oldest server (2006) and newest (2018) are different, but the e-mails have *always* been sent.
Starting on April 14, 2020, the e-mail alerts from all three servers were not consistently arriving in my Outlook inbox. In other words, the e-mails would arrive just fine, then suddenly stop. A short time later, usually between 15 to 75 minutes later, the e-mails would start arriving again. Even though the scripts run 24x7, the outages always occur somewhere between 11:45 AM and 1:30 PM. I did verify that the data imports worked and the reports were generated. To simplify matters, I created a script that does nothing but send a "Hello World" message.
At first, I thought there was something wrong on the mailrelay server, but NetOps investigated and did not find anything wrong. NetOps provided a spreadsheet showing the inbound requests and sure enough, my e-mails were not on the list.
I added additional logic to the Perl script to record what was happening. Per the below, the e-mail at 12:01 PM was sent OK, but the e-mail at 12:16 PM was not.
2020-04-29 12:01:02 Begin test e-mail
2020-04-29 12:01:03 Email sent - **return code: Email::Sender::Success__WITH__Email::Sender::Role::HasMessage**=HASH(0x3617838)
2020-04-29 12:01:03 Done with test e-mail
2020-04-29 12:16:02 Begin test e-mail
2020-04-29 12:16:03 Email sent - **return code:**
2020-04-29 12:16:03 Done with test e-mail
I brought in a fresh copy of the CPAN email::stuffer on one of the older windows servers, but that has not made any difference. According to the CPAN documentation, there are dependencies (Carp, Email::MIME, Email::MIME::Creator, Email::Sender::Simple, File::Basename, Module::Runtime, Params::Util, Scalar::Util, strict, warnings), but I didnít see those updated and assume that is OK.
Has anyone seen this issue before? Any ideas on how to proceed would be greatly appreciated.