Auto Replies going back to Sendgrid - sendgrid

We are using sendgrid to send emails via SMTP. Sendgrid attached the return-path header to the outgoing emails so that bounces go back into sendgrid. However if a user has vacation emails set up they are being returned to the return-path. Do we have any way of capturing the emails somehow in Sendgrid? It appears the web hooks for bounces do not capture the auto replies and they do not appear anywhere.

Related

Gmail automated unsubscribe emails - How to stop them?

When a user unsubscribes from an email in gmail, it seems gmail sends an email to the sender with:
`subject`: "unsubscribe"
`body`: "This message was automatically generated by Gmail."
`to`: u+(somesuperlongrandomstring)#domain.tld
`from`: (Email of user who unsubscribed)
Similarly, when a user unsubscribes from an email in Apple Mail, it seems Apple Mail sends an email to the sender with:
`subject`: (blank)
`body`: Apple Mail sent this email to unsubscribe from the message "(Subject of email unsubscribed from)".
`to`: u+(somesuperlongrandomstring)#domain.tld
`from`: Email of user who unsubscribed
We use mailgun to handle unsubscribes already, but as of 28th March 2022, these emails from both providers now make it through our email routing.
Does anyone know how to tell gmail or Apple Mail to not send these emails? They are redundant because mailgun is already handling the unsubscribe using the list-unsubscribe header as you'd expect.
Alternatively, does anyone know how to set up Mailgun so these messages aren't passed through routes?
So Mailgun didn't provide any help, sadly. But looking through their documentation, and the headers of these emails, it seems possible to use their Routes to hide the emails completely.
The three clues are:
Emails always coming in the format u+(...)#domain.tld
Gmail unsubscribes always have the subject "unsubscribe"
Apple Mail unsubscribes always have the header: X-Apple-Unsubscribe:true
As such, you can create a route as such to capture and discard these emails using a custom route with the raw expression set to:
match_recipient("u\+(.*)#domain.tld") and (match_header("X-Apple-Unsubscribe", "true") or match_header('subject', 'unsubscribe'))
It's sad that Mailgun stopped doing this themselves, but at least there is a solution with their tooling!

Configuring POP3 with Sendgrid - Can't receive emails but can send them

All I have is an email client (emClient) and a working sendgrid account. When prompted to enter an email address, I can happily put anything#mydomain.com and it will confirm that it works with SMTP. I can also send emails using this client. I authenticate with the username apikey and my api key.
However, these emails are permanently stuck in the "outbox" and are constantly sent over and over again, presumably because the client has no confirmation that they were sent. When trying to set up a new account under this domain, I setup my "incoming server" as smtp.sendgrid.net and provide my credentials and it sort-of works (after prompting me for my authentication?).
As you can see, SMTP authenticates just fine and this makes sense as I am seemingly able to send email. However, both IMAP and POP3 when I select them in the "incoming server" are stuck on this "testing" stage until they fail.
Now, if we skip ahead to me sending something out - basically, it works. I receive the email on the destination, it does not get marked as spam and it comes from my domain and my name.
However, when I attempt to receive an email on the anything#mydomain.com one, it just doesn't do anything. I don't get an error from gmail that it wasn't delivered, it simply just doesn't get delivered.
For my domain settings, I have the following configured:
Twilio SendGrid developer evangelist here.
While SendGrid allows you to send emails over SMTP or via the API, SendGrid is not a full mailbox that you can connect to over POP3 or IMAP. You cannot connect to SendGrid using an email client, that is not what it is intended for. SendGrid is not a mailbox, but a way to programmatically send and receive emails and other email based events.
The way to receive incoming emails is via the inbound parse webhook. When you have set that up, incoming emails to your configured domain will cause a webhook, an HTTP request, to be sent to a URL you configured, with all the information about the email.

Send mass email with Gmail API

I want to send mass email with GMail API.
Currently I add all the addresses at the To section.
But every recipient should receive the mail and see only his address and not the other ones. Is there a method/API that I can use for this?
As far as I know, Gmail was not created for sending bulk emails as it restricts the number of recipients and has tons of other limitations. You should try to use third-party service for this.
Here you can find Gmail API limitation. It says
100 Recipients per message sent via SMTP (by POP or IMAP users) or the Gmail API

Sendgrid - Activity says email delivered but email not received

I tried to send an email through sendgrid. I have a custom domain myself#contoso.com. If i try to send an email to user1#gmail.com with the from address as myself#contoso.com,then,the email is delivered to gmail with "via". When i try sending email to myself#contoso.com with the from address being myself#contoso.com the activity says the email is delivered however, in outlook client i have not received the email. What is it that I can try or do?
I have tried whitelisting contoso.com but it did not work
This is not an answer, as it doesn't help work out why the emails that are "Delivered" have not been received, but this is SendGrid's note on why Email messages with the “Delivered” status are not received:
Twilio SendGrid posts the Delivered event after the destination server accepts the message with a 250 OK response. Once an email is accepted by the destination server, we are unable to see what happens to the message. The receiving server could send it to the inbox, queue it for later delivery, put it into the spam folder, etc.
Often times, a recipient domain will initially accept a message for delivery, and then apply additional filtering afterwards. In this situation, we would have posted the Delivered event, but not have any insight into the additional filtering. Any additional Twilio SendGrid events for your email message would be triggered by recipient engagement (i.e. open/click events, unsubscribes, etc.).
Also note that at the time of writing, that answer had 26 downvotes (and zero upvotes) on the SendGrid website, probably indicating that many other users have experienced this problem.
I had several issue solving this problem. The most important part is to set "Sender Authentication" from sendgrid to your domain dns. There is a instruction here. I'm using godaddy, so the link to set dns is https://dcc.godaddy.com/manage//dns .

How to reduce number of deferred emails SMTP SendGrid

I am using sendgrid to send out emails. My Django code for sending emails looks something like this
client_message = EmailMessage(
'Subject',
'Message Content',
'Name <support#domain.org>',
[client_email],
['support#domain.org],
)
client_message.content_subtype = "html"
client_message.attach('MyFile.pdf', file, 'application/pdf')
client_message.send(fail_silently=False)
I have the content_subtype as HTML so that I can do page breaks between paragraphs.
I am sending out 2 emails at a time and am sending a very low volume, < 100 / day. I just began sending emails. My emails are landing in Gmail spam inbox and not getting delivered at all into Yahoo / Comcast. I have already whitelisted my own domain's DNS using SendGrid.
What is best policy for my email content so get them delivered? I have heard
Removing all hyperlinks in my message
Putting a physical mailing address in the footer of the email
Putting the words "reply STOP to unsubscribe" in the email footer
Changing the content type of my email from HTML
It's important that I attach the files when sending the email. What else can I do to make sure my emails go through?
I had just verified my domain a few hours before sending the ultimately deferred emails. I believe the answer is that my domain verification was still being processed, and my emails landed in the the recipients inbox 2 days later. For future people having this problem, if possible see if the problem fixes itself after a few days.
Litmus.com is also a fantastic resource to check your content and security settings.