Forum: Ruby on Rails Cannot get tlsmail working; Want Gmail as SMTP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris S. (Guest)
on 2008-12-07 19:18
This is killing me, folks. I have reviewed numerous examples and tried
two different approaches to try and use Gmail (Google Apps account) as
my application's SMTP. Every time, both on my slicehost server and local
dev machine (both Ubuntu Linux), my logs show no errors and I see a copy
of the mail in my logs. Yet I never received a test email. I've tried
both the action_mailer_tls plugin and the tlsmail gem. Both give the
same results. I prefer to get tlsmail working. Here are the tlsmail
settings, at the end of my environment.rb, that I'm using:

require 'tlsmail'
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)

ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
    :address => 'smtp.gmail.com',
    :port => 587,
    :tls => true,
    :domain => '[my google apps domain]',
    :authentication => :plain,
    :user_name => '[google apps login]',
    :password => '[password]'
  }

With this setup I'm trying to use Gmail as my SMTP in both dev &
production mode with full logging.

I'm assuming there is a problem with my app connecting to the SMTP
server. How can I debug this? I'd like to trace the app's connection to
the SMTP server.

Is there a specific port I need open on my end to make the transaction
successful?

Any help with debugging would be greatly appreciated. Thank you.
Chris S. (Guest)
on 2008-12-07 20:34
Nevermind, it's working. I just wasn't looking in the right places.
Peter F. (Guest)
on 2009-01-03 18:41
Chris S. wrote:
> Nevermind, it's working. I just wasn't looking in the right places.

Hi,

I think I have the same problem, could you describe what helped?
Thanks.
Peter F. (Guest)
on 2009-01-03 19:04
Peter Frosta wrote:
> Chris S. wrote:
>> Nevermind, it's working. I just wasn't looking in the right places.
>
> Hi,
>
> I think I have the same problem, could you describe what helped?
> Thanks.

Nevermind, it's working now :)
This topic is locked and can not be replied to.