This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| post '/contact' do | |
| configure_options | |
| Pony.mail( | |
| :from => [params[:name], "<", params[:email], ">"].join, | |
| :to => '[email protected]', | |
| :subject => ["Opt-in via /contact: ", params[:name]].join, | |
| :body => [params[:name], params[:email]].join(": ") | |
| ) | |
| redirect '/' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'truemail' | |
| require 'minitest/spec' | |
| require 'minitest/autorun' | |
| Truemail.configure do |config| | |
| config.verifier_email = '[email protected]' | |
| config.smtp_safe_check = true # setting to false makes SMTP validation fail | |
| end | |
| def valid?(email) |
OlderNewer