Skip to content

Instantly share code, notes, and snippets.

@zhhz
Created May 27, 2009 12:11
Show Gist options
  • Select an option

  • Save zhhz/118615 to your computer and use it in GitHub Desktop.

Select an option

Save zhhz/118615 to your computer and use it in GitHub Desktop.
class Mailer
# Sends the mail using SMTP.
def net_smtp
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
Net::SMTP.start(config[:host], config[:port].to_i, config[:domain],
config[:user], config[:pass], config[:auth]) { |smtp|
smtp.send_message.....
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment