问题
I am using rails devise gem. Devise sends cofirmation email to new users. Actionmailer is configured to use my gmail account to send emails.
The email is sent by sender: "no-reply@myapp.com" which is my actionmailer global username configuration.
I want to set sender to include my name "Mahmoud Khaled no-reply@myapp.com"
And for sure I can't update actionmailer username configration to include name because it should be only GMAIL username.
Any help how can i set devise from parameter?
回答1:
edit your config/initializers/devise.rb
file - it's pretty near the top, config.mailer_sender
回答2:
If you are using stmp of gmail, you cannot change the address of sender.
Google prohibited changing the address of sender.
回答3:
For me this one Mahmoud Khaled no-reply@myapp.com
is working, by emails go directly to spam folder (gmail,yahoo,hotmail)
来源:https://stackoverflow.com/questions/7674879/how-to-set-devise-mails-sender-name