Search code examples
phpemailbulk

Why is PHP mail function not recommended for sending bulk email?


Could somebody explain to me, why is PHP's mail function not suitable for sending mass emails? I'd like to understand this as deeply as possible - it would be really nice if someone trained in the arcane art of sending email through PHP could explain how all this works. Other online sources are welcome too!


Solution

  • From php.net:

    It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.

    The link above specifies 2 alternatives however.