MarkR wrote:The above is daft. Don't write your own SMTP implementation (PHP has one built in!), and don't use SMTP if there is a local MTA available (e.g. if sendmail is working).
A local MTA is pretty much essential, as this is the only way which mail will get queued correctly if the upstream server (smart host or whatever) is down for any reason.
Think mail() is really good function but limited to send not mailing..
SMTP is too fast
SMTP permit to manage more smtp server for send mailing with more server
SMTP return realime error (correct??) about basic email (bad address,...)
Neither PHP's SMTP implementation, nor the above piece of code, have any provision for queueing and retrying in the event of a server failure.
Mark
uhm... you write that trought smtp there isn't queue and with mail() yes, correct ?
think that for mailing is better to manage retry directly throught script..
x example if we send 30.000 emails x hour and the 5% have an error we have more than 1500 emails for any hour that add to queue.. dangerous for server and for blacklist..
🙂