views:

26

answers:

2

Hi there,

I spend a good deal of time building an email system for my Rails app that uses Gmail to send bulk mail to a list of opt-in users. I realize a shortcomming of using Google Apps for my mail, namely a rate limit on the number of emails it will send out (i believe 500). Anyway, I have reached out to my users to see how many have received the email, and a lot of them have not, though some have. The list I tried sending to was about 540 users, so I would have expected more "yes, got it," then "nope, still waiting" responses.

I have two questions:

  1. Do these settings look correct for outgoing bulk mailing through Gmail? Again, using google apps to manage my domain and i know some people (including myself) have received the mailer. This is in a mail.rb initializer in my app.

    ActionMailer::Base.delivery_method = :sendmail
    ActionMailer::Base.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 25,
      :domain => "mydomain.com",
      :authentication => :login,
      :user_name => "[email protected]",
      :password => "mypass"
    }
    
  2. Is there any way I can test if the mail was delivered, or at least attempted to be delivered? I can't tell where in the list the mailer stops mailing! The way I generate the list is through a query which then passes the user info to a mailer worker which sends the emails out via Starling/Workling. Any advice here would be useful. Happy to post code, but want to make sure the method I'm using is sound.

Thanks for the help!

+1  A: 

Gmail requires TLS (a form of SSL, usually setting useSSL to true will work) on the outbound smtp server with port 587, not port 25. Also, I have never seen the need to set a domain on a Gmail apps account and setting up programmatic email sends. (.NET and PHP).

Tommy
+1  A: 

According to this http://mail.google.com/support/bin/answer.py?hl=en&answer=13287 you should use secured connection, either TLS or SSL.

František Žiačik