actionmailer “from” setting

前端 未结 2 737
春和景丽
春和景丽 2020-12-11 10:05

I am using ActionMailer and in my mailer model, I have a from set like this

default :from => \"from@example.org\"

In my environment.rb,

相关标签:
2条回答
  • 2020-12-11 10:26

    Gmail doesn't let you send as a different user -- it will always make the "From" address the account you're using to sign on (this is for security/spam prevention I believe, that way you can't spoof someone else's address).

    Assuming you own the e-mail address(es) you want to send from, there's a way through your Google account to allow sending from those e-mail address(es). Go into the Gmail options, click the "Accounts" section, and click "Add another e-mail address you own."

    0 讨论(0)
  • 2020-12-11 10:33

    It appears that now it's possible to send emails with a different sender through gmail's SMTP.

    I've listed my way to do it here:

    Send an email through gmail but configure a different email address

    0 讨论(0)
提交回复
热议问题