How to set Devise sender name for email

后端 未结 3 828
离开以前
离开以前 2021-01-03 20:39

Although this thread doesn\'t say much, I figured you set the sender name in the Devise intializer like this:

app/config/initializers/devise.rb

Devise.setu         


        
相关标签:
3条回答
  • 2021-01-03 20:51

    You can also use escaped characters like this:

    config.mailer_sender = "\"Support Desk\" <support@site.com>"
    
    0 讨论(0)
  • 2021-01-03 20:52

    This is it:

    config.mailer_sender = '"Example.com" <your@site.com>'
    
    0 讨论(0)
  • 2021-01-03 21:13

    If you need to do this for devise, heroku and mandrill: and you're setting the email address as an environment variable you'll need to do it like so (I found out the hard way when the above email format above broke our sign up process, let my pain be your gain :)

    Label:  Value:
    EMAIL   Example.com <no-reply@example.com>
    

    No ' or " required.

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