在使用 ActionMailer 时,是否有方法指定发件人和收件人信息的电子邮件和名称?
通常你会这么做:
@recipients = "#{user.email}"
@from = "info@mycompany.com"
@subject = "Hi"
@content_type = "text/html"
但是,我还想指定名称—— MyCompany <info@mycompany.com>
,John Doe <john.doe@mycompany>
。
有办法吗?