I'm sure somebody has answered this question, I just haven't found the
thread...
I want to pass some variables into a template, then send this template
as the email body. Here's what I was thinking if you'd like to set me
straight.....
post '/contact' do
name = params[:name]
surname = params[:surname]
email = params[:email]
company = params[:company]
industry = params[:industry]
mail = Mail.new do
from email
to '
jada...@gmail.com'
subject 'you have a contact from ' + name
html_part do
content_type 'text/html; charset=UTF-8'
body haml :message
end
end
mail.delivery_method :sendgrid
mail.deliver
haml :thanks
end
Everything goes out, but the message body doesn't come through.
Thanks in advance!