zend freamwork 怎么实现异步发送邮件

WBOY
Release: 2016-06-23 14:15:58
Original
918 people have browsed it

用Zend_Mail来发邮件,是成功的没有报错,但是等待时间太长,有2、3分钟,才显示发送成功。
收件人也能收到邮件。

所以想做异步邮件发送,但是,不会整这个啊,Google也找不到相关让我能整明白的帖子。

只好求助了


回复讨论(解决方案)

木人懂啊,CSDN?还是zend freamword做不了?言语一声撒
加分

目前来说,应该是做不到,除非自己写二进制插件。
用php脚本在后台发邮件,直到脚本完成,网页才算结束,否则会一直卡在这里。
我想了2个变通的办法:
1个是php发邮件之前,先把网页都输出,刷新输出缓存,再调用发邮件的代码,造成一个网页已经加载完成的假象。
2个是用ajxs脚本调用服务器端的php发邮件,这样用户的界面会比较友好。
还一个方法或许可行,就是直接用js脚本发邮件,但我没有尝试过,但目前js好像已经无所不能了,不妨尝试下。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!