Anthony
posted this on December 08, 2010 04:32
Hi all,
We send emails from multiple FROM addresses, and it is important that email bounces get sent back to the person sending the message. After a bit of digging around in the SendGrid SMTP API & Event Notification API we managed to implement a solution. Here's how:
Cheers,
Anthony.
Comments
Thanks for the great tip! It worked beautifully!
I tweaked the PHP API example for sending emails by adding the UniqueArgs as follows:
$from = "yourname@yourdomain";
$subject = "This is the email subject line";
$hdr->setUniqueArgs(array('from'=>$from, 'subject'=>$subject));
This adds the extra information (from and subject) to the outgoing email which in turn is available as $_POST['from'] and $_POST['subject'] variables in the PHP script that monitors events available here: http://sendgrid.com/documentation/display/api/Event
Thanks,
Marcelo Ramagem
Another solution is to enable bounce forwarding on your account and leave the email address field blank, this will send all bounce notifications back to the senders "From" address.
An article was created that explains this more in depth this can be found here:
http://support.sendgrid.com/entries/21838602-bounce-reports-notific...
Thanks
Kyle Kern
SendGrid Support
Hi Kyle,
How can I enable the bounce forwarding? At what settings in admin?
Neophyte,
In order to enable bounce forwarding on your SendGrid account, log in then go to email reports>bounces>settings, then just check the box for " Enable bounces forwarding"
Or you can follow this link http://sendgrid.com/bounces/bounceManagement
If you have any problems our support team can help you out, just send an email to support@sendgrid.com
Thanks!
Kyle Kern
SendGrid Support