Hi all, I have a problem with my action mailer .! When i send mail in the email it shows the html tags same written as in mailer view html here is my code: In the Model :---------------- class CronjobMailer < ActionMailer::Base def cronjob(sender,recipients, subject, message, late_commers) @bcc = recipients @recipients = ''support-h8LaB9d9DMb/PtFMR13I2A@public.gmane.org'' @from = sender @subject = subject @late_commers = late_commers @sent_on = Time.now @body[:message] = message end end :---------------- In the Cronjob_mailer view in cronjob.html.erb <!DOCTYPE html> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> </head> <body> <h1>Welcome to example.com</h1> <p> You have successfully signed up to example.com, your username is: .<br/> </p> <p> To login to the site, just follow this link: . </p> <p>Thanks for joining and have a great day!</p> </body> </html> and here is how i am initiating the mailer CronjobMailer::deliver_cronjob(sender,recipient_list,@subject,@messege, @late_commers) when i deliver mail in the email it gives me the same code instead of html output . Please help me Thanks in advance -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rajesh B. wrote in post #1032117:> Hi all, > > I have a problem with my action mailer .! > > When i send mail in the email it shows the html tags same written as in > mailer view html> > and here is how i am initiating the mailer > > > CronjobMailer::deliver_cronjob(sender,recipient_list,@subject,@messege, > @late_commers) > > > when i deliver mail in the email it gives me the same code instead of > html output . >Interesting. What version of Rails are you using? I''m still in 3.0 and I deliver stuff like in the rails guide: UserMailer.welcome_email(@user).deliver In your case I would see it like CronjobMailer.cronjob(sender,recipient_list,@subject,@messege, @late_commers).deliver have you tried something like that? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I am using rails 2.3.8 Do i require any other gem ? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rajesh B. wrote in post #1032142:> I am using rails 2.3.8 > Do i require any other gem ?Well it is long time ago since I used Rails 2.3 For sure the Rails guide that I suggested is for Rails 3.0.x and the mailer logic was changed and improved from 2.3 to 3.0. Many things changed there. If you are just starting the project I would recommend upgrading at least to Rails 3.0 and if you dare even to Rails 3.1 which is the new beast. If you need to stick to rails 2.3 maybe this is old enough http://railscasts.com/episodes/61-sending-email Cheers. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have added @content_type = ''text/plain'' in the mailer method it worked. :-) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have added @content_type = ''text/html'' in the mailer method it worked. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.