LovingRails
LovingRails

Reputation: 1575

Rails4 - How to add from name to emails sent from my rails app?

I have a rails app on heroku and I use sendgrid addon to send emails.

When I receive emails from Stack Exchange in my gmail, I receive it as follows.

Stack Exchange <[email protected]>

But when I receive email from my website, it's like the following

[email protected] via sendgrid.info 

How can I do the same with the emails from my website?

Is it possible to send it like this from my rails app?

My Website <[email protected]>

Does it have anything to do with my rails app at all?

Upvotes: 1

Views: 53

Answers (2)

Rishav Rastogi
Rishav Rastogi

Reputation: 15492

Just replace "[email protected]" with "My Website <[email protected]>" where ever you are specifying from address.

Upvotes: 0

Jordan Running
Jordan Running

Reputation: 106027

Just use "My Website <[email protected]>" as the from value. (Yes, this is standard, and yes, ActionMailer will handle it as expected.)

Upvotes: 2

Related Questions