# ActionMailer + GMail STMP: How to set FROM header?

**URL:** <https://www.ruby-forum.com/t/actionmailer-gmail-stmp-how-to-set-from-header/190622>\
**Category:** Rails\
**Created:** [June 23, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/actionmailer-gmail-stmp-how-to-set-from-header/190622 "2010-06-23T23:16:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![twp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c89c15/32.png) [@twp](https://www.ruby-forum.com/u/twp)\
**Post date:** [June 23, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/actionmailer-gmail-stmp-how-to-set-from-header/190622/1 "2010-06-23T23:16:56Z")

</div>

I am using Ruby 1.8.7 with Rails 2.3.8 and the GMail SMTP configuration.

However all mail being sent by my application has its ‘from’ field as  
the gmail address that logs in, instead of what I supply in the from  
function of my ActionMailer.

Is there any way to change this, or this is a restriction originating  
from GMail? The Reply-to address seems to work though.

---

<div class="post-metadata">

**Author:** ![twp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c89c15/32.png) [@twp](https://www.ruby-forum.com/u/twp)\
**Post date:** [June 24, 2010, 1:23am UTC](https://www.ruby-forum.com/t/actionmailer-gmail-stmp-how-to-set-from-header/190622/2 "2010-06-24T01:23:08Z")

</div>

On Jun 23, 2010, at 4:16 PM, Tom Pett wrote:

> I am using Ruby 1.8.7 with Rails 2.3.8 and the GMail SMTP configuration.
> 
> However all mail being sent by my application has its ‘from’ field as  
> the gmail address that logs in, instead of what I supply in the from  
> function of my ActionMailer.
> 
> Is there any way to change this, or this is a restriction originating  
> from GMail? The Reply-to address seems to work though.

This is part of Gmail. No matter what you set the From as in your  
ActionMailer, GMail will send it from your Gmail account.

I had to switch from using Gmail to a locked-down direct SMTP server  
using exim4.

Thanks!

Jon Brisbin

> **[jon brisbin | home](http://blog.jbrisbin.com/)**
>
> This is a starter/theme for GatsbyJS
