I have some PHP code that help send emails. The way it works is that there is a list of unique keys, every key has to be sent to a different email address. Sometimes we need to be able to send 1000 of these key out at once, and hence, 1000 emails.
I am using the Pear Mail SMTP code found in this post with gmail. It works very well when sending just a small number of keys. However when I try to send many keys (over 100), i often get this error:
From what I have read, this means that for whatever reason, the SMTP server isn't taking emails right now, and denies the transfer, suggesting to try back later. I am not quite sure what to do here to handle this problem. Should I make the script pause for a few seconds and try again? Does the error mean something different? What am I to do?