如何解决发送邮件在codeIgniter缓慢? [英] How to solve the send mail slow in codeIgniter?

查看:172
本文介绍了如何解决发送邮件在codeIgniter缓慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用默认的codeIgniter邮件类,这是非常慢的我发送电子邮件,它需要我从开始到完成3秒。我可以做一些事情,让用户认为它更快。我知道发送电子邮件需要时间,但我可以先显示结果给用户,并发送到以后或其他解决方法?谢谢。

I am using the default codeIgniter mail class, which is very slow for me to send the email, it takes me up to 3 seconds to from start to finish. Can I do something to make the user think it is faster. I know that sending email takes time, but can I show the result to the user first, and send to later or something other workaround? Thanks.

推荐答案

这不会是慢的类,它将是您尝试连接到的SMTP邮件服务器发送页面滞后的电子邮件。

It won't be the class that is slow, it will be the SMTP mail server you are trying to connect to that sends the email that is making the page lag.

假设它是一种类型的表单,你可以使用AJAX提交它,并让接收脚本发送电子邮件。或者,您可以尝试使用PHP邮件,而不是SMTP。

Assuming it's a form of some kind you could submit it using AJAX and have the receiving script send the email. Alternatively you could try using PHP mail rather than SMTP.

这篇关于如何解决发送邮件在codeIgniter缓慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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