Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
DAZ4126 Contact form code
post '/' do
require 'pony'
Pony.mail(
from: "DAZ4126<daz4126@gmail.com>",
to: 'daz4126@gmail.com',
subject: "A message from the DAZ4126 website",
body: params[:message],
port: '587',
via: :smtp,
via_options: {
:address => 'smtp.sendgrid.net',
:port => '587',
:enable_starttls_auto => true,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:authentication => :plain,
:domain => 'heroku.com'
})
redirect '/success'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.