Hi I should be missing something really basic to not get this right…
- I need to get the name of the user and some custom text in the
subject field in the mailer
- 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 = ‘[email protected]’
@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
On 7 Nov 2007, at 14:21, Cass A. 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
Hmm… thanks Fred, I knew I was missing something very basic…
Cheers
Cass
Frederick C. wrote:
On 7 Nov 2007, at 14:21, Cass A. 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
Hi Fred, I got it working now Thanks
Cass
Watch the Railscast for sending email => www.railscasts.com
On Nov 7, 11:00 am, Cass A. [email protected]