Alternative for PHP mail

后端 未结 3 1938
滥情空心
滥情空心 2021-01-21 04:10

In relation to an earlier question I\'m looking for an alternative way to send an order from my website to the division in my company that processes the order.

Currently

3条回答
  •  逝去的感伤
    2021-01-21 04:40

    mail() is fine for simple stuff, but often you want a more robust library that has solved the mail problem in PHP.

    My personal choice is Swift Mailer.

    Also from reading your other question, could this be of benefit

    • Your app writes the order email to database, in a queue.
    • You have a Cron running, that sends say 30 emails every 10 minutes.
    • It then removes the last sent 30, ready to be processed again in 10 minutes.

    The advantage is that when you have a queue of emails to be sent out, they can be processed in batches, and also you will have a copy in the database if the mail fails. It will be easier to query the database then chase up the mailed that was undelivered (or delivered late).

提交回复
热议问题