ruby - Rails 4 + ActionMailer: ":from" is filled with incorrect email address -


i fighting setting "from" information shown in email in header.

it still shows incorrect email address. in mailer class, manually set default email address:

class notificationmailer < actionmailer::base   default content_type: "text/html", :from => 'default@email.com' 

i specified in method sending email(s):

  def welcome_email(user)     @user = user     mail(to: @user.email, subject: "welcome!", from: 'default@email.com')       end 

but when receive email, it's my-personal-email@gmail.com. searched through rails app email address set , it's here:

config/initializers/setup_email.rb:

actionmailer::base.delivery_method = :smtp actionmailer::base.smtp_settings = {   :address => "smtp.gmail.com",   :port => 587,   :domain => "logistadvise.com",   :user_name => "my-personal-email@gmail.com",   :password => "mypassword",   :authentication => "plain",   :enable_starttls_auto => true } 

emails sent out well, worries me unable set "from" header.

how that?

thank you.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -