Subject: | would like timeout for MailMsg() |
MailMsg() hung on us over the weekend, partly due to a misconfigured DNS
record including one bad mx in rotation with other good ones. This may
be a corner case, but it would be helpful if there was at least an
optional timeout value for connecting and transmitting the message.
This way, persistent daemons (or programs run out of cron) using this
module for sending out notification wouldn't silently hang.
I'm the first to admit that mail systems should have their own
monitoring, but it seems that a timeout value to MailMsg() makes sense
regardless. For now, I'm wrapping my call to it in an alarm() eval {}.