Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6910785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:51:33+00:00 2026-05-27T08:51:33+00:00

I’m trying to send emails but the emails will never use my :from =>

  • 0

I’m trying to send emails but the emails will never use my :from => code, instead the email always arrives using the ‘from’ of my gmail smtp settings. So for example the email arrives and says FROM: email@gmail.com instead of FROM: support@mydomain.com , and in the logs it shows the email sent using the FROM: contact@mydomain.com which is from my devise initializer.

How can I fix this? Its really upsetting at the moment 🙁 Thanks for any help.

I’m using Gmail and setup my smtp settings like this:

config/initializers/mailer_setup

ActionMailer::Base.smtp_settings = {
     :address              => "smtp.gmail.com",
     :port                 => 587,
     :domain               => "mydomain.com",
     :user_name            => "email@gmail.com",
     :password             => "mypassword",
     :authentication       => "plain",
     :enable_starttls_auto => true
     }

mailer/user_mailer.rb

   def reset_password_instructions(user)
     @user = user
     @url  = "http://localhost:3000"
     mail(:to => user.email,
          :from => "support@mydomain.com",
          :subject => "recover your password"
          )
   end
end

Log

Started GET "/users/password/new" for 127.0.0.1 at 2011-12-04 12:03:22 -0700
  Processing by Devise::PasswordsController#new as HTML
Rendered devise/shared/_links.erb (1.7ms)
Rendered devise/passwords/new.html.erb within layouts/application (2103.3ms)
Completed 200 OK in 2122ms (Views: 2112.1ms | ActiveRecord: 0.8ms)


Started POST "/users/password" for 127.0.0.1 at 2011-12-04 12:03:27 -0700
  Processing by Devise::PasswordsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"hEYh1/G9P0noE+VobBbgremT+rpt+fJFez7H99dOGNM=", "user"=>{"email"=>"barry269@gmail.com"}, "commit"=>"Send me reset password instructions"}
  User Load (1.7ms)  SELECT "users".* FROM "users" WHERE "users"."email" = 'barry269@gmail.com' LIMIT 1
Rendered devise/mailer/reset_password_instructions.html.erb (1.0ms)

Sent mail to barry269@gmail.com (3585ms)
Date: Sun, 04 Dec 2011 12:03:28 -0700
From: contact@mydomain.com
Reply-To: contact@mydomain.com
To: barry269@gmail.com
Message-ID: <4edbc4008ace9_5ab8153b1c470979@ihal-MacBook-Pro.local.mail>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Hello barry269@gmail.com!</p>

<p>Someone has requested a link to change your password, and you can do this through the link below.</p>

<p><a href="http://localhost:3000/users/password/edit?reset_password_token=Gg3Aqe6sFD3rDLUAda47">Change my password</a></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
Redirected to http://localhost:3000/users/sign_in
Completed 302 Found in 4281ms


Started GET "/users/sign_in" for 127.0.0.1 at 2011-12-04 12:03:32 -0700
  Processing by Devise::SessionsController#new as HTML
Rendered devise/shared/_links.erb (1.7ms)
Rendered devise/sessions/new.html.erb within layouts/application (80.7ms)
Completed 200 OK in 340ms (Views: 90.6ms | ActiveRecord: 2.3ms)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:51:34+00:00Added an answer on May 27, 2026 at 8:51 am

    Gmail is changing your from. Get your own mailserver if you don’t want modifications.

    There is a guide on how to set a different sender when using the mail interface and/or googles servers.

    Note for IMAP/POP users: If you access Gmail through a POP or IMAP email client (e.g. Outlook) and would like to send messages with a custom “from” address, you have two options. We recommend that you configure your email client with two outgoing SMTP servers, one for Gmail and one for your other address. Or, you can use Gmail’s outbound servers with a different “from” address. If you’ve already configured the alternate address, your message will be sent from:otheraddress@domain.com, sender:username@gmail.com, regardless of which custom from configuration you chose.

    You have to enable your 3rd party address for gmail first. Check the guide linked above.
    IIRC gmail will set the different address, however the users will still see that its coming from gmail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.