Hi I should be missing something really basic to not get this right...
1. I need to get the name of the user and some custom text in the
subject field in the mailer
2. I need to get the name of the website instead of the full email
address in the from field.
Here is my method in the invitation_mailer.rb:
def invitation(email, invitation, sent_at = Time.now)
@subject = invitation.user.name
@body[:invitation] = invitation.title, invitation.comments
@body[:user] = invitation.user.name
@recipients = email
@from = ''admin-VhyzyQIMo4ifJiTClGZNEw@public.gmane.org''
@sent_on = sent_at
end
This method just gives the sender''s name in the subject field, now I
need the subject field to be like this:
"Linda invites you to join her on MYOWNTRIBE"
and the From filed to be like this: "MYOWNTRIBE"
Could anyone please guide me...
Cheers
Cass
--
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
-~----------~----~----~----~------~----~------~--~---
On 7 Nov 2007, at 14:21, Cass Amino wrote:> > > > This method just gives the sender''s name in the subject field, now I > need the subject field to be like this: > > "Linda invites you to join her on MYOWNTRIBE" > > and the From filed to be like this: "MYOWNTRIBE" > > Could anyone please guide me...This is really basic ruby - you''ll run into trouble if you don''t know stuff like this The #{} construct allows this sort of stuff, ie message = ''Hello'' puts "The message is #{message}" will print The message is Hello Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hmm... thanks Fred, I knew I was missing something very basic... Cheers Cass Frederick Cheung wrote:> On 7 Nov 2007, at 14:21, Cass Amino wrote: >> Could anyone please guide me... > This is really basic ruby - you''ll run into trouble if you don''t know > stuff like this > The #{} construct allows this sort of stuff, ie > > message = ''Hello'' > puts "The message is #{message}" > will print The message is Hello > > Fred-- 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 -~----------~----~----~----~------~----~------~--~---
Hi Fred, I got it working now :) Thanks Cass -- 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 -~----------~----~----~----~------~----~------~--~---
Watch the Railscast for sending email => www.railscasts.com On Nov 7, 11:00 am, Cass Amino <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hmm... thanks Fred, I knew I was missing something very basic... > > Cheers > > Cass > > Frederick Cheung wrote: > > On 7 Nov 2007, at 14:21, Cass Amino wrote: > >> Could anyone please guide me... > > This is really basic ruby - you''ll run into trouble if you don''t know > > stuff like this > > The #{} construct allows this sort of stuff, ie > > > message = ''Hello'' > > puts "The message is #{message}" > > will print The message is Hello > > > Fred > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---