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.

有帮助吗?

解决方案

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

其他提示

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)
)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top