Operating System - HP-UX
1752803 Members
5208 Online
108789 Solutions
New Discussion юеВ

Delivery Receipt on mail message sent from perl

 
SOLVED
Go to solution
Rick Heile_1
Frequent Advisor

Delivery Receipt on mail message sent from perl

Does anyone know how to create a mail message using perl that returns a delivery receipt? I need to know if a message I sent was actually delivered to its mailbox, if not I need to contact to user another way since the mail system is down.

Thanks for your help,

Rick
2 REPLIES 2
Steven E. Protter
Exalted Contributor
Solution

Re: Delivery Receipt on mail message sent from perl

You may try this.

sendmail

rc=$?

if [ $rc ne 0 ] then
echo "mail failed"
fi

I'm attaching a batch mailing script that might be adapted to this purpose. This one includes an attachment, but that is optional.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Christopher Caldwell
Honored Contributor

Re: Delivery Receipt on mail message sent from perl

Are you expecting a delivery receipt from the MTA (e.g. sendmail)? If so, few folks I know that run MTAs on the public Internet honor (or configure) classic ALL-IN-ONE style delivery receipts. If you own all of the MTAs in question, you can produce a system that gives you delivery receipts.

If you want to verify that the sendmail transaction completed (i.e. the remote MTA accepted or rejected a given piece of e-mail), get procmail; set up a bounce address; process bounces using procmail.

Note that such a system does _NOT_ guarantee delivery. You just know that the mail was accepted [or rejected] by the remote MTA. You can't reliably know what happens after that unless you control all of the systems.