Page 1 of 1

Gmail problem

Posted: Fri Apr 27, 2007 5:24 am
by ollip1
I try to send bigger quantities of emails through smtp.gmail.com. I think it allows max 50 emails per one send.
Following seems not to work:

Code: Select all

$conn = new Swift_Connection_SMTP("smtp.gmail.com", Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS);
    $conn->setUsername("xxxx.xxxxx@gmail.com");
    $conn->setPassword("xxxxxxx");
    $swift =& new Swift($conn);
    $swift->log->enable();
    //Reconnect after 48 emails, wait 5 second before reconnect
    $swift->attachPlugin(new Swift_Plugin_AntiFlood(48,5), "anti-flood");  
    $message = new Swift_Message($subject);
This sends first 48 email round and then gives me various errors and does not continue even though I would have more to send.

Code: Select all

fgets() [function.fgets]: SSL: fatal protocol error (error type 2 in /home/missiona/public_html/swift3/lib/Swift/Connection/SMTP.php on line 229) [context: Array]

Fri, 27 Apr 2007 12:47:13 +0300; There was a problem communicating with SMTP: Expected response code(s) [250] but got response []>> QUIT << << 220 mx.google.com ESMTP h12sm743614wxd >> EHLO www.domain.com << 250-mx.google.com at your service, [69.93.22.90] 250-SIZE 28311552 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES >> AUTH PLAIN xxx.xxx@gmail.com&#65533;xxx.xxx@gmail.com&#65533;xxxxxx << 501 5.5.2 Cannot Decode response h12sm743614wxd !! Expected response code(s) [235] but got response [501 5.5.2 Cannot Decode response h12sm743614wxd] >> RSET << 250 2.1.0 Flushed h12sm743614wxd >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> b2xsaXBla2thLmphbG92YWFyYUBnbWFpbC5jb20= << 334 UGFzc3dvcmQ6 >> YWN0aW9ueA== << 235 2.7.0 Accepted ++ Message sent to 1/1 recipients >> MAIL FROM: << 250 2.1.0 OK >> RCPT TO: << 250 2.1.5 OK >> DATA << 354 Go ahead >> >> . << 250 2.0.0 OK 1177667229 h12sm743614wxd ++ Message sent to 1/1 recipients >> MAIL FROM: << 250 2.1.0 OK >> RCPT TO: << 250 2.1.5 OK >> DATA << 354 Go ahead >> >> . << 250 2.0.0 OK 1177667230 h12sm743614wxd ++ Message sent to 1/1 recipients >> MAIL FROM: << 250 2.1.0 OK >> RCPT TO: << 250 2.1.5 OK >> DATA << 354 Go ahead >> >> . << 250 2.0.0 OK 1177667232 h12sm743614wxd ++ Message sent to 1/1 recipients >> MAIL FROM: << !! Expected response code(s) [250] but got response []
ssl seems to be configured

Code: Select all

--with-openssl' '
Is there a way to send more than 50 emails through gmail?

Posted: Fri Apr 27, 2007 5:56 am
by Chris Corbyn
Is that log excerpt the end of the log after the QUIT command?

If it is, then the numbers correlate with Gmail's 50 email limit since it fails on the 51st. Obviously Gmail is smarter than to happily close and re-open a connection. As far as I'm aware, Gmail have started selling premium MX services so something could have changed at their end. I'd certainly sleep for more than 5 seconds.... that will look almost as if you never really went away... 30 or 60 seconds would be better but I bet Gmail log your IP so this probably won't help.