Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- require 'mail'
- def send
- #sendという名前の関数が定義されていると、mail.deliverの実行に失敗する...
- end
- mail = Mail.new do
- from "yoggy0@gmail.com"
- to "yoggy0+test@gmail.com"
- subject "subject subject..."
- body "body body..."
- end
- mail.delivery_method(:smtp,{
- :address => "smtp.gmail.com",
- :port => 587,
- :domain => "smtp.gmail.com",
- :user_name => "yoggy0@gmail.com",
- :password => "passwordpassword",
- :authentication => :plain,
- :enable_starttls_auto => true
- })
- mail.deliver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement