require 'mail' smtp = { :address => 'smtp.163.com', :port => 25, :domain => '163.com', :enable_starttls_auto => true, :openssl_verify_mode => 'none' } Mail.defaults { delivery_method :smtp, smtp } mail = Mail.new do subject 'xxx' add_file File.expand_path("/opt/xxx.log") end mail.deliver!
|
近期评论