[Rails] Re: emails - html not rendering

2009-08-31 Thread heimdull
If you want to send a HTML email have a look at the Rails documentation it is very well documented. Here is a snip: Mailer views are located in the app/views/name_of_mailer_class directory. The specific mailer view is known to the class because it’s name is the same as the mailer method. So for e

[Rails] Re: emails - html not rendering

2009-08-31 Thread Marnen Laibow-Koser
Ritvvij wrote: > Can anyone please advise on how to send emails in HTML format instead > of plain text? Just don't. HTML belongs on Web pages, not in e-mail. (If you really need to, I believe you will have to set a content header on the e-mail so that the HTML is parsed. But there are few goo

[Rails] Re: emails - html not rendering

2009-08-30 Thread Ritvvij
Thank you. On Aug 30, 11:41 am, Matt Jones wrote: > Next time, try reading the documentation first. From the > ActionMailer::Base docs: > > To send mail as HTML, make sure your view (the .erb file) generates > HTML and set the content type to html. >   class MyMailer < ActionMailer::Base >    

[Rails] Re: emails - html not rendering

2009-08-30 Thread Matt Jones
Next time, try reading the documentation first. From the ActionMailer::Base docs: To send mail as HTML, make sure your view (the .erb file) generates HTML and set the content type to html. class MyMailer < ActionMailer::Base def signup_notification(recipient) recipients recipient.em

[Rails] Re: emails - html not rendering

2009-08-30 Thread Ritvvij
Can anyone please advise on how to send emails in HTML format instead of plain text? On Aug 29, 7:28 pm, Ritvvij wrote: > Ya,,, > > Controller Code >   def sendmail >     recipient = params[:email][:recipient] >     subject = params[:email][:subject] >     message = params[:email][:message] >  

[Rails] Re: emails - html not rendering

2009-08-29 Thread Ritvvij
Ya,,, Controller Code def sendmail recipient = params[:email][:recipient] subject = params[:email][:subject] message = params[:email][:message] cc = "" Emailer.deliver_contact(recipient, subject, message, "Administrator", cc) if request.xhr? flash[:notice] = 'Error

[Rails] Re: emails - html not rendering

2009-08-28 Thread heimdull
how do you send the email? Is there a controller action that sends the email? On Aug 28, 10:19 am, Ritvvij wrote: > Hi, > > i am using ruby 1.8.7 and rails 2.3.3 > i can send emails using gmail smtp > my config is: > > ActionMailer::Base.raise_delivery_errors = true > ActionMailer::Base.perform_