Safe way to send mail via PHP to many users

后端 未结 7 1606
青春惊慌失措
青春惊慌失措 2021-01-30 09:41

Let me explain what I mean in my title. Let\'s say, that for example I\'m creating a small e-commerce system for one web shop/catalog. There\'s a possibility for customers to ch

7条回答
  •  青春惊慌失措
    2021-01-30 10:31

    Using something like Swiftmailer, PHPmailer or Zend_mail are much better alternatives to using the simple mail() function as it can be easily marked as spam. There are simply too many issues with mailing that need to be considered - most of these are solved by using pre-existing libraries.

    Just a few problems that need to be addressed when sending mass emails manually:

    • Using incorrect headers.

    • Processing bounced messages

    • Timing out of script due to an influx of emails.

    Edit:

    Probably not the answer you're looking for. But, I would strongly suggest you invest in something like Campaign Monitor or Mail Chimp. Since this process is not for educational purposes, but commercial, I would strongly suggest the above services.

提交回复
热议问题