是否有可能asycronously使用PHP,而在交付给用户的反馈意见发送邮件? [英] Is it possible to send mail asycronously using PHP while giving user feedback on delivery?

查看:125
本文介绍了是否有可能asycronously使用PHP,而在交付给用户的反馈意见发送邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能asycronously发送邮件使用PHP而交付给现场用户反馈信息?

Is it possible to send mail asycronously using PHP while giving live user feedback on delivery?

我已经recenty写了一个小的应用程序为我们公司的内部网发送格式的电子邮件给客户。接口是相当干净并且只需要一个作业号的输入端,然后它构建并发送邮件。邮件,而正在兴建,得到了许多来自其他服务器的附件,一切都是自动化。所使用的库是的PHPMailer

I have recenty written a small app for our company's intranet for sending formatted emails to customers. The interface is quite clean and only requires the input of a job number, it then builds and sends the mail. The mail, while being built, obtains a number of attachments from another server and everything is automated. The library used is PHPMailer.

有没有一种方法,使用其他技术,有可能,但仍使用PHP作为主要语言,展现了邮件的进度正在发送?我有codeD健壮的错误检查,以检查邮件实际发送等,但我错过给予用户通过一个进度条等实际投递邮件到服务器的视觉线索的方式。

Is there a way, using other technologies, possibly, but still using PHP as the main language, to show progress of the mails being sent? I have coded robust error checking to check if the mail was actually sent, etc. but i am missing a way of giving users the visual clue of actually delivering the mail to the server via a progress bar, etc.

使用PHP和像Ajax是这可能吗?你将如何确定在途邮件的进展如何?

Is this possible using PHP and something like Ajax? How would you determine the progress of the mail in transit?

推荐答案

我觉得这里最好的办法是通过估计的时间。您可以测试一些10MB的邮件需要多少时间发送,知道你的SMTP服务器的接收速度。有了这些信息,你可以根据它的大小估计传输时间的任何电子邮件,并给你的客户端基于一些视觉分心。

I think the best option here is by estimating the time. You can test how much time some 10MB mails takes to be sent, to know the receiving speed of you SMTP server. With that information you can estimate transfer time of any email based on its size, and give your client some visual distraction based on that.

这篇关于是否有可能asycronously使用PHP,而在交付给用户的反馈意见发送邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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