Already registered? Log in
Please make sure that you have installed gem mail.
Please change the following in this script:
#!/usr/bin/ruby
begin
require 'rubygems'
require 'mail'
rescue LoadError => e
puts "Missing Dependency #{e.message}"
exit 1
end
mail = Mail.new do
from 'sender@example.com'
to 'recipient@example.com'
subject "Your Subject"
text_part do
body 'It is a text message'
end
html_part do
content_type 'text/html; charset=UTF-8'
body 'It is a html message'
end
end
Net::SMTP.start('mail.smtp2go.com', 2525, 'yourdomain.com', 'USERNAME', 'PASSWORD', :login) do |smtp|
smtp.send_message(mail.to_s, 'sender@example.com', 'recipient@example.com')
#Port 8025, 587 and 25 can also be used.
end
Try SMTP2GO free for as long as you like:
Try SMTP2GO Free → Paid plans available for over 1,000 emails/month.