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.
Related
I'm using AWS SES in a Lambda function to send emails. When the email is sent to an Outlook address, or without an attachment to a Gmail address, it is received immediately.
However, when I send an email containing an attachment (in our case an Excel file), the emails are received almost exactly 4 minutes late every time.
I believe that Gmail is flagging our emails with attachments as phishing attempts, as mentioned in this post.
I have enabled SPF, DKIM and DMARC for my domain. Any idea what else I could try to fix this?
This is what our emails look like:
Update: This only happens with Excel files. When I send this as a csv file, it is sent immediately.
I am trying to send an email from my Firebase Cloud Functions using the SendGrid's mail client for Node.js
I am following their example described as follows:
const sgMail = require('#sendgrid/mail');
sgMail.setApiKey(functions.config().sendgrid.key);
const msg = {
to: 'my_own_mail#gmail.com',
from: 'my_other_own_mail#gmail.com',
subject: 'Sending with Twilio SendGrid is Fun',
text: 'and easy to do anywhere, even with Node.js',
html: '<strong>and easy to do anywhere, even with Node.js</strong>',
};
sgMail.send(msg);
Once the function is fired, everything gets executed successfully. In my function logs I get Status 202 and the actual mail gets delivered but not in the main mailbox but rather in the Spam folder. When I open the message, it simply says:
I don't really understand what is the problem.
NOTE: If I send the message to an Yahoo email it doesn't go in the Spam folder. Same applies if I send it to my business email.
Your problem is not related to cloud functions or the code, there are a few anti-spam rules you need to follow, this gave me a good starting point
Sendgrid does not send your messages to the SPAM folder it all depends on the recipients mail delivery flow spam filters.
Most messages are marked as spam for one of the following reasons
1. Message is not authenticated properly
Validated that your message is authenticated properly with SPF or DKIM
2.Your message originates from an IP that is in a Blacklist (this might be on Sendgrid's)
Try by sending a message to your self and open the message headers , then look for entries like the one below
Received: from xxxxxxxxx.com (xxxxxxx.com [xxx.xx.xxx.xx])
by xxxx.com with SMTPS id ##############
The IP between [] is the sending server IP try to use public blacklist such as spamhaus to see if it is blacklisted and report to Sendrig if you find a match
3.The content of your message has known phishing techniques (accidentally or not)
Check the "Format your mail" section for Gmail senders guidelines as general recommendation
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 .
I created event registration web sites (you can imagine something like http://www.eventbrite.com/), which allow users to subscribe for event updates. When subscribed, we send mass emails (with the same content) to those users.
It was ok before, but recently I noticed that GMail always put the email into Spam folder.
As any texts would always go to Spam folder, I suspect that my domain was blacklisted by Gmail.
1) Is there a way to request google to put my domain into the whitelist?
2) Let's say it can't and I decide to register for new domain.
Is there a way to avoid the mass email to be marked as spam by Gmail? (may be something like what Facebook email notification do?)
Yes, don't send mass email :-) If you really want to avoid being considered a spammer, send out emails with less recipients, and don't swamp the mail server with them. Let's say, for example, you have thirty recipients for a given update. You can send out emails with one recipient every minute for a half hour.
Now the numbers may be different (and will of course depend on the success of your site) but the basic theory will stand up for quite a while.
As to how to get yourself whitelisted in GMail, that's really up to the recipient. They can usually do it by simply adding your email address to their contact list.
Keep in mind whitelisting there refers to individual GMail accounts, GMail itself does not whitelist IP addresses.
It does blacklist them if you misbehave but that generally means you get delivery rejects when trying to send. The fact that your messages are going in to the mail system and being delivered to spam folders indicates that this is an account-based thing, not a global GMail blacklisting of your IP/domain.
In any case, the place to report problems for GMail delivery problems is here.
As a school, we send out mass emails to our parents about events and issues. There's no way we have the time to spend sending out one email per minute. What we did was sign up with AOL as a business account, and we are allowed to do "bulk mailings" until they get multiple complaints. However, gmail clients usually have to list us as a valid sender or else those emails end up in spam folders. Works the same for clients using college alumni accounts from edu addresses. Gmail is the only one who regularly gives us this problem for our recipients on their email servers. We let parents know at orientation that they will have to specifically admit our emails via some setting on gmail.
I am trying to send an email using an Indy Email Client. The body of the email is pretty much a list of various websites (like 50 to 100). The email server is Yahoo. I am finding the email is not going through (I get a "Connection Closed Gracefully" exception). But if I change all instances of "/" to different letters the email goes through. Example:
Change http://mysite.com/mypage.html to http:XXmysite.comXmypage.html
Could the email server be rejecting the email because it looks like spam?
Turns out Goadddy was denying them because links contained in the email were noted as spam sites.