Question

I'm using the free sendgrid plan to send email from my rails app hosted on heroku. I set it up using a combination of these instructions and this tutorial

It's all working, but on gmail the it the sender comes through as 'myemail@myapp.com via sendgrid.me'

Is there any way to get rid of this?

I've had a look at this forum but it's not very clear on whether it's possible.

If I can't remove it, can anyone recommend an alternative, free, service?

Was it helpful?

Solution

I know its an old question. But things are changed and sendgrid now allows all account users to whitelabel their domains. Whitelabeling allows us to get rid of “sent on behalf of” or “via sendgrid.me” email header.

Domain and link whitelabeling are available for all SendGrid users, no matter the account type. However, the IP whitelabeling process revolves around one central element: the dedicated IP address. Customers at SendGrid with a Pro account or higher are automatically assigned one dedicated IP address, which they whitelabel for their outbound mail. During this process, one of the DNS records that must be hosted is an A record, which specifies that all mail going out along this dedicated IP address is authorized to send mail on behalf of your domain.

OTHER TIPS

Yes it is possible, I just did it!

Login to your sendgrid dashboard. Then go to My apps -> DKIM -> Settings then select "Set the DKIM domain to match the FROM domain" By default, Domain is set to "sendgrid.me".

DKIM documentation

The problem is once you do that, all the emails will likely go in the spam folder... So because of that I switch back to the default settings.

No.

GMail displays this automatically based on the mail headers and the nature of the e-mail sending service:

https://support.google.com/mail/bin/answer.py?hl=en&answer=1311182&ctx=mail

Update: Sendgrid now allows you to customize DKIM which will get rid of this message.

Sendgrid | How to Eliminate the 'On Behalf Of' Message

Short answer:

No.

Longer answer:

"this limitation applies to our Free, Lite and Bronze plans, and cannot be modified unless you upgrade your account to Silver or higher."

Detailed answer:

There is a setting in SendGrid dashboard as answered by Fabian, but it won't work because you are on a free plan. I personally tested it and the email still showed "via sendgrid.info".

Here is a confirmation from SendGrid support team:

https://support.sendgrid.com/hc/en-us/articles/200181738-My-emails-are-displaying-as-on-behalf-of-or-via-in-some-mail-clients

"By default, SendGrid signs all email with DKIM to improve deliverability with recipient domains. However, when using accounts that do not include Whitelabeling, this means that the domain in the 'from' field will not have the proper DNS record to authenticate the e-mail. Because of this, SendGrid inserts a Sender header as either sendgrid.me or sendgrid.info, and the e-mail can then be properly authenticated. Be advised, this limitation applies to our Free, Lite and Bronze plans, and cannot be modified unless you upgrade your account. When using a Silver or higher account, you can solve this display issue by matching the domain in your 'from' address to what you have set within your account Whitelabel wherever possible."

I just clicked the "Add Domain" button under "Whitelabels" (in the dashboard of my free account) and added my domain (see note on this below), and then copied and pasted the generated CNAME records as instructed. After a brief delay (only a minute or two) it seems to have worked! Emails are no longer saying "via sendgrid.net".

Note that it would not allow me to leave the "subdomain" field blank, so before doing the above procedure I created a new CNAME record with a hostname of "sendgrid" and pointed it to "@".

So the full procedure I followed was:

  1. Created a new CNAME record for my domain with host "sendgrid" and value "@"
  2. Clicked "Add Domain" in SendGrid's whitelabel settings and entered "sendgrid" as the subdomain (and of course my domain in the "domain" field)
  3. Clicked Save and SendGrid generated 3 CNAME records
  4. As one of the CNAME records was a CNAME for "sendgrid", I edited it again in my DNS manager and pointed it to the newly generated value
  5. I added the other two CNAME records it generated (s1._domainkey and s2._domainkey)

Note: MailGun offers a feature in their free accounts for SPF and DKIM records that offers all the same features as their paid accounts (except for a limit on the number of emails you can send per month. I'm not totally certain that the setup above won't lead to deliverability problems in some cases (depending on the reputation of your domain) so for a new server you might want to consider either a paid account somewhere or a more full-featured free service like MailGun.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top