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

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.

Related

Using sendgrid domain authentication sends email to spam in 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'.

Sendy External SMTP Bounce Handler

Sendy will not track bounced email address when sending emails via any SMTP server. It only works when if you hook it with AWS SES.
As I'm using SMTP which is hosted on a Linux server along with IMAP, POP3.
I sent thousands of mail using that SMTP and Sendy is not counting Bounced addresses while I checked my mailbox and there was thousands of undelivered mail.
Is there any way to make it count for Sendy SMTP?
I saw this image in Google, Don't know how to make it.
The image you found does not appear to be part of Sendy -- it appears to be from this third party product. It's not entirely clear.
What it seems to do is connect to your mailbox (the one you showed, with the bounces) using the POP3 mail fetching protocol... and read those bounce messages.
The web site seems to imply that this vendor wants access to your server and will install their products for you, which seems like a very dubious practice, so proceed with caution.

Receiving emails with sendgrid and cloudmailin

I have the same concept as mentioned in this question(generating a unique random email address for each user in rails app. When the user sends an email that that randomly generated email address, we process the body and store in db.
I followed the following steps:
Deployed my app in Heroku
Created a sendgrid account and configured the username and password to heroku(to get the sendgrid addon).
added griddler gem and followed the steps mentioned in griddler.
Configured the parse webhook in sendgrid with my host and url.
Here comes the main problem:
I registered to coludmailin and it generated the single email address. I don't really understand how to receive uniq emails to my rails application now. I tried white labeling the cloudmailin.net in sendgrid but it doesn't work(may be am wrong here).
Googled a lot but didn't understand how to proceed from here. Can someone please help me in solving this issue. Appreciate if I get a good step-by-step reference
There are two options to do this with CloudMailin.
Option 1:
On the free plan you can use a + in order to separate the email address given to you on CloudMailin and still create a unique email address that each customer can respond to. For example:
If you CloudMailin email address is example1234#cloudmailin.net you can use example1234+unique_id_54321#cloudmailin.net. CloudMailin calls unique_id_54321 the disposable part of this email address. This way you can send an email out and state the sender of that email is example1234+unique_id_54321#cloudmailin.net and then tell one user from another.
Option 2 (the better option):
However, the best way to do this is to use CloudMailin's custom domains. You can then receive anything#yourdomain.com.
With custom domains enabled you set CloudMailin up to be your MX server. Then any email coming into yourdomain.com goes direct to CloudMailin (you can use app.yourdomain.com to avoid conflicts with your regular email if needed).
You can then send email out with the sender as user-12345#yourdomain.com, task-12345#yourdomain.com or any other unique identifier. When you receive the email from CloudMailin the envelope will show that the email was sent to user-12345#yourdomain.com and you can then use this to resolve who the user was.

receive emails in rails app

I know that we can receive emails into rails app using ActionMailer configuration or using griddler/mailman gems. But is that possible to receive unique emails?
Ex: When a user is signed up into the app I create him a unique email address.
When the user sends an email to that unique email address rails app should receive that email.
I used google to find the solution but couldn't get the answer. Please help me(reference links are also much appreciated).
no complete solution, but an idea: you could set up a catch all email address on your mail server that receives all mail sent to your domain.
then, in rails you use the mailman/mail gem to receive mails sent to this catch-all address and process it depending on the To header.

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.