Question

I recently came across sending emails via Rails. After watching railcast, it seems that you can write up a template when using Action Mailer. I really liked this feature for my purpose. I also came across Pony, which seems really easy to use.

I was wondering if I can use templates for sending emails via Pony, unless Pony is meant for express non-templated emails.

Was it helpful?

Solution

In my research, Pony seems to be promoted as a non-template based tool, making it "simpler" to use. The home page for the utility does not mention templates at all: https://github.com/benprew/pony

OTHER TIPS

You can easily access the view framework by explicitly rendering a template:

Pony.mail(
  :to => 'somewhere@example.com',
  :from => 'sender@other.example.com',
  :subject => 'an example',
  :body => render_to_string("path/to/_partial", :locals => {foo: @foo}, :layout => false)
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top