Hi All,
Is there a way to change the "From" mail header in ActionMailer?
Here''s how my simple ActionMailer class look like:
class Notifier < ActionMailer::Base
def contact_notification(person, email, message)
recipients "my_email-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org"
from email
subject "Message from domain.com"
body message
end
end
Ideally I want the output to look like this: "user_name <no-
reply-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org>"
Many thanks in advance !
Gr.
- Jermaine
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Jermaine wrote:
Got it working with this:
from "#{person} <#{email}>"
- Jermaine
> Hi All,
>
> Is there a way to change the "From" mail header in ActionMailer?
> Here''s how my simple ActionMailer class look like:
>
> class Notifier < ActionMailer::Base
>
> def contact_notification(person, email, message)
> recipients
"my_email-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org"
> from email
> subject "Message from domain.com"
> body message
> end
> end
>
> Ideally I want the output to look like this: "user_name <no-
> reply-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org>"
>
> Many thanks in advance !
>
> Gr.
>
> - Jermaine
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---