Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
smtp mail example in Ruby
SUBMITTED BY:
Guest
DATE:
May 21, 2015, 10:13 a.m.
FORMAT:
Ruby
SIZE:
757 Bytes
Raw
Download
Tweet
HITS:
686
Go to comments
Report
require
'mail'
#
# You can use mandrillapp.com as smtp server, if you don't have one.
#
Mail
.
defaults
do
delivery_method
:smtp
,
{
:address
=>
"smtp address"
,
:port
=>
port
,
:domain
=>
'domain'
,
:user_name
=>
'username'
,
:password
=>
'password'
,
:authentication
=>
nil
,
:enable_starttls_auto
=>
true
}
end
Mail
.
deliver
do
to
"example@IMPORTANT.bot"
from
"IMPORTANT@example.bot"
subject
"just a test :D"
body
"just a test :D"
end
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus