I'm trying to send a simple email using my Gmail account through ruby's mail gem but the email is never sent nor received. I followed the steps from a similar question but I wasn't sure what to put under the domain field. I believe this may be my issue but I'm not sure.
my code:
require 'mail'
options = { :address => "smtp.gmail.com",
:port => 587,
:domain => 'your.host.name',
:user_name => 'REMOVED',
:password => 'REMOVED',
:authentication => 'plain',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
end
mail = Mail.new do
from 'REMOVED'
to 'REMOVED'
subject 'This is a test email'
body 'test'
end