PHP邮件的替代品 [英] Alternative for PHP mail

查看:166
本文介绍了PHP邮件的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于之前的问题我正在寻找一种替代方式,从我的网站向我公司的处理订单的部门发送订单。

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.

目前我使用PHP mail(),但经常这给出了问题。发生严重延误。是否有替代PHP mail()将订单推送到我的公司?所以我不想轮询网站。

Currently I use PHP mail(), but frequently this gives problems. Big delays occur. Are there alternatives to PHP mail() that pushes the order to my company? So I prefer not to poll the website.

推荐答案

mail()对于简单的东西很好,但通常你想要一个更强大的库来解决PHP中的邮件问题。

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

我个人的选择是 Swift Mailer

另外,通过阅读您的其他问题,这可能是有益的

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


  • 您的应用程序将订单电子邮件写入队列中的数据库。

  • 您运行的是Cron,每10分钟发30封电子邮件。

  • 然后删除最后发送的30,准备好在10分钟内再次处理。

优点是,当您有一个要发送的电子邮件队列时,可以批量处理它们,如果邮件失败,您还将在数据库中有一个副本。查询数据库然后追逐未交付(或延迟交付)的邮寄会更容易。

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).

这篇关于PHP邮件的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆