Firstly, great work on Swift Mailer. Does exactly what I want and a lot faster than PHPMailer. Unfortunately, I'm running into a really bizarre issue with Gmail.
Bizarrely, this happens completely randomly. I know my authentication is good, because I can manually login to Gmail using the same details. Any ideas? Is this likely just an issue with the Gmail SMTP servers?
No response has come back from Gmail after sending the username. Sounds like a network issue. Hopefully you're not using gmail to send large volumes of mail since this could be the problem... it kicks you off after 100 mails in <insert unknown short space of time here>.
I can't actually find any written limits on the number of mails sent using Gmail per day on their site, is there anything written there? I see there's a limit of 500 recipients per message, or 100 if using SMTP directly, but nothing about a max number of messages.
EDIT: Just for the record, the account I'm trying to test with has probably only sent about 20 e-mails today, to 1 individual at a time. Incidently if I change the account details to a brand new account, it occasionally happens too.
If I'm experiencing network issues, do you recommend I try and increase the timeouts or just loop through the function until it's successful?
The only reason I know Gmail have limits is because I've consistently had support requests about the gmail connection dropping after exactly 100 emails and then subsequent attempts failing. I don't have anything in writing, nor have I looked so there's a possibility I'm wrong I suspect they'd have been getting fed up with people blasting emails through their servers without even using their email service very much (and hence not clicking on ads)
Increasing the timeout could help yes, although I think the default is 15 seconds anyway which is pretty long. It's difficult without seeing exactly what the problem is; right now all I can see for sure is that gmail asked for a username, Swift sent the username and Gmail didn't respond.
Fatal error: Uncaught exception 'Swift_BadResponseException' with message 'Expected response code(s) [250] but got response []' in /hsphere/local/home/albstream/maasbesa.org/admin/swiftmail/lib/Swift.php:250 Stack trace: #0 /hsphere/local/home/albstream/maasbesa.org/admin/swiftmail/lib/Swift.php(310): Swift->assertCorrectResponse(Object(Swift_Events_ResponseEvent), 250) #1 /hsphere/local/home/albstream/maasbesa.org/admin/swiftmail/lib/Swift.php(319): Swift->command('RSET', 250) #2 /hsphere/local/home/albstream/maasbesa.org/admin/swiftmail/lib/Swift.php(455): Swift->reset() #3 /hsphere/local/home/albstream/maasbesa.org/admin/actions.php(63): Swift->send(Object(Swift_Message), Object(Swift_RecipientList), Object(Swift_Address)) #4 {main} thrown in /hsphere/local/home/albstream/maasbesa.org/admin/swiftmail/lib/Swift.php on line 250
would the Antiflood Plugin separate the BCC s on 98 each time in the following example using swift->send(), or does that work only with the batchSend() ?
You know, sending them all as Bcc isn't faster than a batchSend(). Swift still has to modify the message for every recipient so that the Bcc header only has that recipient's name in it It's just sendmail on unix systems which happens to be fast for Bcc since it reads the headers instead of accepting a list of recipients.
The anti-flood plugin probably isn't doing what you expect it to in this case since it works on a per-message basis. 100 recipients in one message is just one send to Swift. Thinking about it, I should probably distinguish between sending a full message and sending to one recipient as far as the events go. Something I'll look at in v4.
seems like I can't find a way around having my own newsletter.
my hosting smtp failed as well so I turned again to gmail but I guess, I was wrong when I was imagining the Bcc scenario same as when a human has to send it....I was thinking 100 bcc is one email, and then it's gmail's resopnsibility to take care of the rest.
hmmm....