suppose my site grows such that I will need to send out hundreds and thousands of emails per day….will the PHP mail() function still suffice as a solution to such scenario or will I have to implement an alternative solution? If so, what solution should I seek in such scenario?
Share
mail()opens and closes a socket each time it sends a message so no, it’s not the best idea as those operations are quite inefficient.A better solution is to use PHP’s PEAR Mail extension; this was designed for sending emails en masse.
As an extension to PEAR Mail, there’s also Mail_queue which puts messages into a queue and sends them in the background. This might be a better option in your case.