Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

DAZ4126 Contact form code

View gist:1977178
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
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.