跳至内容
U-Mail邮件营销平台FAQ
用户工具
您在这里:
首页
»
smtp接口说明--使用ruby通过smtp协议发信
smtp接口说明--使用ruby通过smtp协议发信
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
==== 使用Ruby通过smtp协议发信 ==== # install `mail` gem first: `gem install mail` require 'mail' Mail.defaults do delivery_method :smtp, { :port => 25, :address => "smtp.bestedm.org", :user_name => "domaintest@info.bestedm.org", :password => "****", :enable_starttls_auto => false, :openssl_verify_mode => 'none', } end mail = Mail.deliver do to 'test@test.com' from 'domaintest@info.bestedm.org' subject 'Hello' text_part do body 'Testing mail' end end 注:请在 :user_name => 后替换您的邮件推送地址;:password => 后替换您的邮件推送密码;to '后替换接收地址;from '后替换邮件推送地址
smtp接口说明--使用ruby通过smtp协议发信.txt
· 最后更改: 2017/03/22 03:52 (外部编辑)
页面工具
显示页面
回到顶部