# Rails, gmail client and mass-emailing failure

**URL:** <https://www.ruby-forum.com/t/rails-gmail-client-and-mass-emailing-failure/172967>\
**Category:** Rails\
**Created:** [July 30, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/rails-gmail-client-and-mass-emailing-failure/172967 "2009-07-30T16:53:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![itkin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/22d042/32.png) [@itkin](https://www.ruby-forum.com/u/itkin)\
**Post date:** [July 30, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/rails-gmail-client-and-mass-emailing-failure/172967/1 "2009-07-30T16:53:49Z")

</div>

Hello,

I build from scratch an email componenent to my webapp using  
actionmailer.  
All my single email went to destination, but when I try to send  
mass-emailing from the console, it sends few then crash as follow :

Any idea ? Thanks in advance !!

“221 2.0.0 closing connection 28sm928123eye.4\r\n”  
 → “220 [mx.google.com](http://mx.google.com) ESMTP 24sm234383eyx.3\r\n”  
 ← “EHLO [vinprive.net](http://vinprive.net)\r\n”  
 → “[250-mx.google.com](http://250-mx.google.com) at your service, [88.191.88.39]\r\n”  
 → “250-SIZE 35651584\r\n”  
 → “250-8BITMIME\r\n”  
 → “250-STARTTLS\r\n”  
 → “250-ENHANCEDSTATUSCODES\r\n”  
 → “250 PIPELINING\r\n”  
 ← “STARTTLS\r\n”  
 → “220 2.0.0 Ready to start TLS\r\n”  
 ← “EHLO [vinprive.net](http://vinprive.net)\r\n”  
 → “[250-mx.google.com](http://250-mx.google.com) at your service, [88.191.88.39]\r\n”  
 → “250-SIZE 35651584\r\n”  
 → “250-8BITMIME\r\n”  
 → “250-AUTH LOGIN PLAIN\r\n”  
 → “250-ENHANCEDSTATUSCODES\r\n”  
 → “250 PIPELINING\r\n”  
 ← “AUTH PLAIN AHZpbnByaXZlQHZpbnByaXZlLm5ldABsYWJlbGV0dGU=\r\n”  
 → “235 2.7.0 Accepted\r\n”  
 ← “MAIL FROM:[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\r\n”  
 → “250 2.1.0 OK 24sm234383eyx.3\r\n”  
 ← “RCPT TO:[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\r\n”  
 → “250 2.1.5 OK 24sm234383eyx.3\r\n”  
 ← “DATA\r\n”  
 → “354 Go ahead 24sm234383eyx.3\r\n”  
writing message from String  
wrote 214569 bytes  
 → “250 2.0.0 OK 1248964197 24sm234383eyx.3\r\n”  
 ← “QUIT\r\n”  
 → “221 2.0.0 closing connection 24sm234383eyx.3\r\n”  
 → “220 [mx.google.com](http://mx.google.com) ESMTP 10sm1237009eyd.52\r\n”  
 ← “EHLO [vinprive.net](http://vinprive.net)\r\n”  
 → “[250-mx.google.com](http://250-mx.google.com) at your service, [88.191.88.39]\r\n”  
 → “250-SIZE 35651584\r\n”  
 → “250-8BITMIME\r\n”  
 → “250-STARTTLS\r\n”  
 → “250-ENHANCEDSTATUSCODES\r\n”  
 → “250 PIPELINING\r\n”  
 ← “STARTTLS\r\n”  
 → “220 2.0.0 Ready to start TLS\r\n”  
 ← “EHLO [vinprive.net](http://vinprive.net)\r\n”  
 → “[250-mx.google.com](http://250-mx.google.com) at your service, [88.191.88.39]\r\n”  
 → “250-SIZE 35651584\r\n”  
 → “250-8BITMIME\r\n”  
 → “250-AUTH LOGIN PLAIN\r\n”  
 → “250-ENHANCEDSTATUSCODES\r\n”  
 → “250 PIPELINING\r\n”  
 ← “AUTH PLAIN AHZpbnByaXZlQHZpbnByaXZlLm5ldABsYWJlbGV0dGU=\r\n”  
 → “535-5.7.1 Username and Password not accepted. Learn more at  
\r\n”  
 → “535 5.7.1 [Check Gmail through other email platforms - Gmail Help](http://mail.google.com/support/bin/answer.py?answer=14257)  
10sm1237009eyd.52\r\n”  
Net::SMTPAuthenticationError: 535-5.7.1 Username and Password not  
accepted. Learn more at  
535 5.7.1 [Check Gmail through other email platforms - Gmail Help](http://mail.google.com/support/bin/answer.py?answer=14257)  
10sm1237009eyd.52

from  
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/net/smtp.rb:576:in  
`auth_plain' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/net/smtp.rb:570:in ` **send** ’  
from  
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/net/smtp.rb:570:in  
`authenticate' from /var/rails/vin-prive/production/releases/20090730141531/config/initializers/smtp_tls.rb:28:in `do\_start’  
from  
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/net/smtp.rb:377:in  
`start' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/net/smtp.rb:315:in `start’  
from  
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action\_mailer/base.rb:628:in  
`perform_delivery_smtp' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/base.rb:508:in ` **send** ’  
from  
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action\_mailer/base.rb:508:in  
`deliver!' from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/base.rb:383:in `method\_missing’  
from  
/var/rails/vin-prive/production/releases/20090730141531/app/models/email.rb:38:in  
`deliver’
