When I send an email to someone with action mailer in a rails 3 project
mail(:to => @email, :subject=> "subject")
Is it possible for the controller to get notified if the message was delivered properly to the :to email address ,so that it will be possible to notify the sender about the email notification failure ?
Thanks.
You can't check to see if somebody's received an email, but you can check to see if they've opened it. Email services these days use a small 1x1px image which contains some values in the query parameters to associate it to the user.
Other than that, no.
The deliver operation applied to a mail object will raise an error if the mail service it uses (e.g. mailgun) refuses it. I assume it's possible to rescue that error but haven't succeeded yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With