[nycphp-talk] Emails not being received when using mail()
Gary Mort
bz-gmort at beezifies.com
Thu Jan 17 02:36:24 EST 2008
Rob Marscher wrote:
> On Jan 16, 2008, at 7:09 AM, Gary Mort wrote:
>> [snip]... use one of the PHP mail packages that supports sending
>> through authenticated external SMTP servers...
>> [snip...It's slower to send that way...[snip]
>
> It was my understanding that it's better to send via SMTP though
> because it taxes your system resources less than using mail() --
> especially when you're managing a large email list.
>
Well, that really depends on your environment.
mail() can be configured to use SMTP or invoke sendmail directly.
Personally, for a really large email list, I'd prefer to invoke sendmail
directly and dump all the messages into the queue at once. Than I'd
tackle deliverability from the email server side, not from PHP. But
that assumes a dedicated box where you can finetune postfix to your
hearts content.
If your on a shared host, they don't like big sudden dumps of email
because the outgoing mail from one person can clog the connection for
someone else. So instead, they prefer SMTP, especially authenticated
SMTP so they can go scream at whoever dumped the big load of email on
the server.
Also mail libraries like Swiftmail can be setup to throttle the link, ie
send 10 messages, than wait a second, send 10 messages, wait a second,
or send no more than 3 messages a second.
My personal feeling is if your going to be dumping huge amounts of email
out on the net, get a VPS somewhere and set it up as a dedicated
outgoing email server, and send through it with authenticated SMTP.
Than you can manage and grow your VPN until you need a dedicated box.
Alternatively, there are tons of companies out there that already do
this service for you, and many of them have API's you can access via
REST, SOAP, or FTP. So why not use them?
More information about the talk
mailing list