0

I'm wondering, whether it is possible to send email messages using mail() function in the loop?

For example, 500k addresses at a time?

One day I tried to send a message to 500 email addresses this way, I inserted some of my email addresses into the address list, the entire cycle was successful, but the letters did not reach. Why it did not work?

Kirill
  • 105
  • 2
  • 8
  • I'm guessing your mail server blocks assumed spam. But there's little we can actually answer here on Stack Overflow. – Marvin Feb 05 '18 at 17:11
  • instead of using mail() function (as this function generally is blocked as a step to prevent spams) send emails via SMTP. https://stackoverflow.com/questions/25909348/how-to-send-email-with-smtp-in-php – Pranay Bhardwaj Feb 05 '18 at 17:14
  • Yes, I have managed to do that via SMTP, that worked! I have just been curious, why it did not work via `mail()` function – Kirill Feb 05 '18 at 17:19
  • There are entire services built around sending e-mail (e.g. MailChimp). E-mail is hard and most hosting providers have agreements that you won't use their services to send UCE, which is probably what you are trying to do (please don't). E-mail is best as one-off, individual e-mails with a real e-mail client (e.g. Outlook, Thunderbird). Spam is never welcome. Using PHP mail() correctly requires a solid understanding of how e-mail works and the function should only generally be used via a library like Ultimate E-mail Toolkit, phpMailer, etc. – CubicleSoft Feb 06 '18 at 13:57

0 Answers0