sending html email w/o template

20 views
Skip to first unread message

tom

unread,
Feb 4, 2015, 9:08:47 PM2/4/15
to Ruby on Rails: Talk
hi,

i want to send html emails. i have a field containing a full html doc structure and i would like to send that. basically the user brings that and saves it to the db.

i have tried various methods, with and without mailer template, also with yield in the template, but i am not getting the user provided html out (render?)

so, in short how do i send html w/o a template, or can the template be empty?


thx

Norm Scherer

unread,
Feb 28, 2015, 1:04:54 PM2/28/15
to rubyonra...@googlegroups.com
I send mail from the database in my app.  It is plain not html but generally will do what you want.  Take a look at the source in http://opencampground.com/download.  Download the source and look in reservation_controller and in res_mailer.rb model.  This is rails 2.3.18 but it might be of some help.  It processes through liquid but that should not add much confusion.

Norm
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMdvtJ%2Bz8-sndOGmGiZ4gYgZOQsfhMRi0F1%2B3gBLVRYtVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Robby O'Connor

unread,
Feb 28, 2015, 1:08:36 PM2/28/15
to rubyonra...@googlegroups.com, Norm Scherer
http://guides.rubyonrails.org/action_mailer_basics.html
http://railscasts.com/episodes/312-sending-html-email?view=asciicast
On 02/28/2015 01:03 PM, Norm Scherer wrote:
I send mail from the database in my app.  It is plain not html but generally will do what you want.  Take a look at the source in http://opencampground.com/download.  Download the source and look in reservation_controller and in res_mailer.rb model.  This is rails 2.3.18 but it might be of some help.  It processes through liquid but that should not add much confusion.


Norm

On 02/04/2015 07:07 PM, tom wrote:
hi,

i want to send html emails. i have a field containing a full html doc structure and i would like to send that. basically the user brings that and saves it to the db.

i have tried various methods, with and without mailer template, also with yield in the template, but i am not getting the user provided html out (render?)

so, in short how do i send html w/o a template, or can the template be empty?


thx

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMdvtJ%2Bz8-sndOGmGiZ4gYgZOQsfhMRi0F1%2B3gBLVRYtVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Robby O'Connor

unread,
Feb 28, 2015, 1:28:47 PM2/28/15
to rubyonra...@googlegroups.com, Norm Scherer
Could also probably use Mailchimp or sendgrid...

On 02/28/2015 01:08 PM, Robby O'Connor wrote:
I send mail from the database in my app.  It is plain not html but generally will do what you want.  Take a look at the source in http://opencampground.com/download.  Download the source and look in reservation_controller and in res_mailer.rb model.  This is rails 2.3.18 but it might be of some help.  It processes through liquid but that should not add much confusion.


Norm

On 02/04/2015 07:07 PM, tom wrote:
Reply all
Reply to author
Forward
0 new messages