Reputation: 175
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 <[email protected]>',
[client_email],
['[email protected]],
)
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
It's important that I attach the files when sending the email. What else can I do to make sure my emails go through?
Upvotes: 0
Views: 2259
Reputation: 175
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.
Upvotes: 1