Using ActionMailer with a Gmail Account

I'm not sure if this refers to a server error or feel free to move it here if that makes sense elsewhere. I saw examples of setting smtp options and using ActionMailer with Gmail and confirmed that they work for me.

Basically, for me it looks like this:

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :user_name            => '<username>',
  :password             => '<password>',
  :authentication       => 'plain',
  :enable_starttls_auto => true  }

Now I need to send an email to an address that is not a simple Gmail account, and yet, the core in it is Gmail. My company uses any google email service that allows you to use gmail, but for addresses that will be listed as username@my.company.com , not @ gmail.com. I know that you cannot just log in to our mail on the main gmail site, so I assume our domain is different. Or something.

At the moment, when I just use my own company user / pass, I get an error message informing me that the user / pass was incorrect. But I guess the problem is that I'm trying to send mail from the gmail version of my username.

, smtp-, Thunderbird, gmail smtp, 587, TLS. , ? .

+5
2

Google , url

http://mail.google.com/a/my.company.com

-, ,

:domain => "my.company.com"

, .

"<user_name>" , .

+5
:address  => 'smtp.gmail.com',
:port   => 587,
:domain => 'busiess.com',
:user_name => 'username@company.com',
:password => 'password',
:authentication => 'plain',
:enable_starttls_auto => true
+2

All Articles