Hi All,
I am trying to send an email on a user sign up. The email is working without any issues. However there is a problem with the :from field that I am specifying. My SMTP setting look like :
ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => "587", :domain => "test.com", :user_name => "support@test.com", :password => "secret", :authentication => "plain", :enable_starttls_auto => true }
and my mailer class looks like,
class TestMailer < ActionMailer::Base
def registration_confirmation(user) @user = user mail(:to => "#{@user.capitalized_name} <#{@user.email}>", :subject => "Welcome", :from => 'registration-do-not-reply@test.com') end end
When the email gets sent, in the console I see that the following :
Sent mail to xxxxxxx@hotmail.com (2846ms)