In my Rails 3 project, I want to send some simple notification emails. I don\'t need to make a template for them or do any logic. I just want to fire them off from various place
The simplest way to send mail in rails 3 without a template is to call the mail
method of ActionMailer::Base
directly followed by the deliver
method,
For ex, the following would send a plain text e-mail:
ActionMailer::Base.mail(
from: "me@example.com",
to: "you@example.com",
subject: "test",
body: "test"
).deliver
http://api.rubyonrails.org/classes/ActionMailer/Base.html#method-i-mail gives you all the header options and also ideas about the how to send a multipart/alternative email with text/plain and text/html parts directly.