Using sendgrid domain authentication sends email to spam in Django - django

I am trying to send email from my Django application. For this, I have used Twilio SendGrid service. Though my application can send the email, it ends up in spam folder. So, I have followed this tutorial to authenticate my domain which I bought from AWS route 53. In sendgrid, the domain authentication status shows 'verified' but the emails are still sent to spam folder. I have not created any MX or TXT record in DNS setting as the tutorial says it was created automatically during domain authentication in sendgrid.
One thing I have noticed that the email still shows, 'via.sendgrid.net' message (attached an image below) with the email. Whereas it should be my authenticated domain name. I have created sendgrid account with an outlook email and using that address to send email from Django app. Is this the reason my emails are going to spam? Or can anyone please help me to find a solution for this problem? Thanks in advance.
FYI: I have done 'Single Sender Verification' in sendgrid during developing this app. But now I have deployed it in aws. I guess this feature is still working instead of 'Domain Authentication'.

Related

Problem with sending email in django using SMTP with new google rules

I am using smtp to send emails in django app but for some reasons it stops working and i found this on the google page.
I do not want to use SendGrid or others.because in my app i send more than 1000000 emails per semester and it was working well before this new condition.
How can i solve this problem ? Thanks.
Try to create an application token in the Google account you use to send the emails with and use it instead of your usual email password.
Have a look at this link: Authorizing Your App with Gmail

Revert emails fetched via django-mailbox, back to Gmail inbox

I am a Django newbie. I have setup a mailbox in Django admin using the django-mailbox package. The URI configuration was a Gmail IMAP email server. While retrieving mails into my Django mailbox, they got deleted from the inbox and got created as db records. Is there a way to revert the emails back to the Gmail inbox, either using a Django API, gsuite's email recovery, or exporting data from db into Gmail inbox?
Thanks in advance for your help.
P.S. the mails are not present in the trash folder.
You might try iterating over each django_mailbox.Message
instance, use the get_email_object method to help generate a MIME message, then use IMAP APPEND to put the message back in your online mailbox.

Emails landing with red banner in gmail inbox

Suddenly all the emails sent through gmail api are landing with a red banner in recipients inbox as shown below.
So, I created a new OAuth ClientID in Google Cloud platform and used those credentials to provide access to my test gmail account. Then I sent emails using Gmail Api and emails are landing in inbox without any red banner which is good.
But we need to use the same old OAuth ClientID as we have so many users who provided access to it. If we change these ClientID and ClientSecret to use the new one, we need all our users to re-authorize, which we don't want to do. Can someone help why the existing OAuth Client ID is throwing this red banner in recipients mailbox?
As stated in this blog, this warning message speaks about one of the security measures taken by Google. Also from this related SO post, either your message contains a scam web page that steal users informations or the Domain/IP of your server has been used in the past for stealing personal informations. Check if IP is blacklisted on Mxtoolbox Configure Reverse DNS (Match your domain name with your IP), SPF and DKIM, Send legitimate email and everything will be fine.

Send email from Openshift without no-reply#rhcloud.com

My Django application sends email out to users. On localhost, it was using my gmail account that i set via settings.py. However, when porting the app onto Openshift, all the headers were ignored. Instead of using the application from, reply-to email addresses, email coming from application on Openshift is FROM no-reply#rhcloud.com and no Reply-to email address.
Here is what I later found:
All e-mails routed through our servers have their From header rewritten. This will continue to function this way until we support e-mail as an "official" feature. Relaying through an external mail server should not overwrite this header." by Sumana Annam, Red Hat, Inc.
https://www.openshift.com/forums/openshift/sending-email-from-jboss-by-defect-the-from-is-no-replyrhcloudcom
Does anyone find a way of sending email from Openshift where the email header does not get rewritten?
Greatly appreciate any help/direction.
The official answer is that you would need to use a third party library to remove the no-reply#rhcloud.com. There is no way to change that header on email that is relayed through openshift's email servers.

Emails sent using SendGrid on Heroku Django app to #gmail.com addresses seem to be blocked

I have a django app on heroku an using sendgrid.
I have gotten messages from a number of users with gmail email addresses saying that they have not received their validation emails after registering to use the site.
I tested it myself, and found that while emails with other addresses go through instantly, but for some gmail accounts it is not going through.
In the sendgrid dashboard, however, it says that all the emails have been delivered.
Can someone tell me what the issue here is? Is gmail blocking emails from my site? It just started happening these last two days. And we're not really sending out that many emails (10 or so a day)
Do the Emails end up in a spam folder, or do they truly disappear?
What kind of plan are you on at SendGrid? If you have your own dedicated IP, have you followed the guidelines on 'warming up' that IP address? Might also want to review the content of the message with SendGrid support, see if they can make any recommendations.
Emails end up in the spam folder. Whenever an email was sent from Heroku, Sendgrid to #gmail accounts, they were viewed as spam by Gmail.
I have the same problem and did not find a solution yet.