0

我想在电子邮件客户端中显示一个漂亮的名字

4

1 回答 1

1

这应该可以解决问题!

class UserMailer < ActionMailer::Base
  def welcome_email(user)
    recipients    user.email

    # PRETTY NAMES
    from          "Prettiest Pony <prettypony@imaginarium.tld>"

    subject       "Welcome to My Awesome Site"
    sent_on       Time.now
    body          {:user => user, :url => "http://example.com/login"}
  end
end

有关详细信息,请参阅ActionMailer 基础知识

于 2010-04-30T19:47:59.107 回答