How do I stop Mailgun from attempting to deliver temporary failed emails? - mailgun

I am very new to Mailgun and the whole transactional mailing routine so I apologize if my question is not worded properly. While testing I sent an email to bar#example.com. I just wanted to see what happens. I received a temporary fail, but then I kept receiving them again and again because Mailgun automatically attempts to re-deliver until the hard fail:
Say, I figured out what was wrong and I want to stop it from doing so. Is there a way to configure this for all emails or a single email address?

Related

AWS SES - Bounced emails

I will try to express my question, I'm sorry if is not the correct way to do it.
I have an AWS SES configured to receive emails from my customers, sometimes the client get in a list and try to send an email too large (above 10MB), and my costumer start to receive bounced emails from all recipients in that list.
The bounce happens when my client tries to send an email for another people but the email of my company appears on CC field.
E.g:
the client sent an email:
TO: wherever#google.com
CC: mycompany#mycompany.com (this one will be sent for my SES); [a lot of other emails.........list]
This mail will be more large than 10MB (my SES must have to treat it).
This chain wil generate an bounced mail for my costumer, once that my email appears on CC list.
It's a little bit complex to express, but basicaly is it.
I'd like to know if is possible to track this attempts when the costumer receive the first bounce email from AWS. and to trigger a alert for me that the costumer is getting in a bounced list.
You can absolutely do this, SES supports notifications per type to SNS. The types are Delivery, Bounce, Complaint.
Each type can be registered to an SNS topic which you can subscribe a Lambda function to.
This Lambda function can then perform any logical decisions that you would like for your workflow.
In addition you can subscribe any email addresses you want to receive the raw notification that it was undelivered, although you will need to confirm there subscriptions before they can receive notifications. This would be ideal for a support inbox for example.
The AWS documentation contains more information about notifications

Receiving complaints for SES transactional emails - are TiS notifications generated by filters?

We're doing everything we can think of to limit the number of complaints we receive and will immediately remove anyone who marks us as junk that does not need to receive our emails. However, the last handful of complaints we've received have come from transactional emails of people who are receiving our company's services and NEED to receive everything we send transactionally as a critical part of our service. (e.g. We are booking their travel on their behalf and we need to send them verification emails to confirm their booking details.)
We're assuming that most of these complaints are somehow either false positives or are being done on accident. One customer confirmed that they did not click the junk mail button but it ended up in their junk folder and they moved it to their inbox. Some questions:
Can a TiS complaint be triggered by any means other than the user manually marking an email as junk in their email client? (Can automatic spam filters trigger this complaint? AWS documentation specifies only clicking the junk button.)
Besides contacting each individual personally, what would you suggest we do? Our complaint rate is continuing to rise even though we are taking action on every one.

AWS SES Production Access setup with Meteor

Setting up Meteor to use "out of the box" AWS SES is simple, and one can use native Meteor "Email" methods without modification.
Steps to implement this can be found here. Thanks to Brian
Shamblen for putting together a detailed answer.
But one caveat with the "out of the box" SES is you need to both verify the sender and receiver email address.
To remedy this, you can put in a request with AWS SES for what they call, Production Access.
And further, according to Brian Shamblen,
The process to get production access is rather complicated. One will
need to handle bounce and complaint notifications from SES and prevent
messages from being sent to those addresses in the future.
Question
What is the Meteor code involved in handling bounce and complaint notifications from SES and prevent messages from being sent to those addresses in the future?
EDIT: Made modifications to question for clarity.
Requesting production access is fairly straightforward. You just need to contact them and they usually give it to you in a couple of hours.
Information about the process is here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html
Load up the URL : http://aws.amazon.com/ses/fullaccessrequest/ and let them know what you will be sending via Emails, for example if you will be sending transaction based email (verification of a transaction, etc)
With production access you can either send email from:
A specific verified email address, where you will be asked to click a link to an email sent to that address to verify you own it
Any email under an entire domain. Under this process you prove you own the domain by editing its DNS records to contain a 'key'.
Most use cases are covered under production access, they typically give you 2000 emails a day and rate limit emails to 5/sec (they queue them so the maximum send rate is 5/sec). If you need more than this you can contact them to raise this additionally.
The process of verification is to stop people quickly creating AWS accounts to mass-spam users. If they allowed this straight-off then AWS IPs would be looked at as spam by other email providers.
For bounce notifications, SES tracks these, and you have to make sure that you don't get an above average bounce rate. Typically these would come from sending unsolicited email, which I wouldn't advise sending via SES.
Production access is only approved by the AWS team. Wait a bit and they should easily give you 2.000 emails/day for free.
As per bounces-unsubscribes... You'll need to have the SES API notify you of each email address which has been 'marked' with such status.
You should store all those email addresses somewhere and tell your app not to send them ANYTHING else in the future.

Flask-Mail not sending emails, no error is being reported

All, I'm trying to setup flask-mail to send notifications to my email when a user registers.
I'm getting no error messages from the script used to send the email, but nothing is actually being sent, or at least, nothing is being received.
Is there a log file which can show if an email was sent, rejected, or maybe if there was even a problem logging onto the server? How does on track this problem?
Any ideas here?
Flask-Email use smtplib which can set debug level: https://github.com/mattupstate/flask-mail/blob/master/flask_mail.py#L139. You can set it with MAIL_DEBUG = True or DEBUG = True. Also check that MAIL_SUPPRESS_SEND = False and TESTING = False.
With debug I can see in stdout mail progress: success, fail, recipients and etc.
See details: http://pythonhosted.org/Flask-Mail/#configuring-flask-mail.
tbicr has the most likely fix, check MAIL_SUPPRESS_SEND first.
What ended up burning me (being new to flask) is that when you instantiate your Mail() object, be sure it's after you've set your app.config values. The Mail() object doesn't go back and look at these values after the fact, so they will default to bad values. What's frustrating is that you won't see any errors when you try to send messages with the default/bad values. At least not as of my posting.
I know this post is from a while ago, but I just ran into the same issue. Like #tbicr mentioned make sure that app.testing is set to False. As it states in the Flask-Maildocs here:
"If the setting TESTING is set to True, emails will be suppressed. Calling send() on your messages will not result in any messages being actually sent."
This was exactly my problem. I implemented Google reCAPTCHA into one of my forms and the app.testing was set to True so I did not have to hit the reCAPTCHA box every time. By removing the app.testing or by setting it to False, the emails were able to be sent.

Amazon SES Statistics

I facing some issue related to Amazon SES Statistic ordering, actually my recent sending mail static are in middle of data record it should be at top or lower of the record so what is the reason behind it?
My Question is How i do a simple report status with how much emails returned, invalid emails and emails sent if the "GetSendStatistics" returns a unordered list?
You will need to sort the data yourself, by using the Timestamp field of SendDataPoint. Unfortunately, the list returning from GetSendStatistics is not sorted.
This happens because due to the characteristics and nature of sending e-mail over the Internet, it might take a different amount of time for a server to determine whether a message (or a set of messages) is confirmed to have bounced, or to be delivered for sure. Please refer to this thread at AWS forums for a similar question and some insight into the issue you are facing.