Created
May 7, 2014 10:30
-
-
Save pobing/08e89527740124d4e77d to your computer and use it in GitHub Desktop.
pony send mail demo
This file contains 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 'pony' | |
mails = {:to=>"[email protected]", | |
:subject=>"问答箱子找回密码", | |
:from=>"[email protected]", | |
:html_body=>"html body", | |
:via=>"smtp", | |
:via_options=>{ | |
:address => 'smtp.exmail.qq.com', | |
:port => '25', | |
:user_name => '[email protected]', | |
:password => 'xxxxxx', | |
:authentication => :plain, # :plain, :login, :cram_md5, no auth by default | |
:domain => "localhost.localdomain" # the HELO domain provided by the client to the server | |
}} | |
Pony.mail(mails) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment