PEAR Mail 太慢了,我的前端超时了 [英] PEAR Mail is so slow, my front end is timing out

查看:63
本文介绍了PEAR Mail 太慢了,我的前端超时了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 php 脚本,可以发送几封电子邮件并将响应回显到我的前端.

I've got a php script that sends a few emails and echoes a response back to my front end.

问题是电子邮件处理速度太慢,前端超时.以下是电子邮件实施的大致步骤.

The problem is that the email handling is so slow, the front end is timing out. Here are the broad strokes for the email implementation.

当用户 A 向用户 B 预订报价时,场景开始.用户 A 收到一封确认电子邮件,用户 B 收到一封通知电子邮件,我和其他 2 名员工收到一封电子邮件提醒.

The scenario kicks off when User A books an offer from User B. User A gets a confirmation email, User B gets a notification email and myself and 2 other employees get an email alert.

这是 3 封独特的电子邮件和 5 个地址.技术细节是:

So that's 3 unique email messages and 5 addresses. And the tech specifics are:

  1. 我正在使用 Pear Mail 类
  2. 我使用 smtp 作为邮件类型.
  3. 我已将身份验证设置为 true.

我认为 smtp 交易会非常简单.我假设我会与邮件服务器握手,将我的消息传递到他们的队列中,并且自由而清晰.但似乎一切都悬而未决.

I thought that the smtp transaction would be pretty straightforward. I assumed I'd handshake with the mail server, pass my message off into their queue and be free and clear. But it does seem that everything is hanging for quite a bit.

推荐答案

Pear Mail Class 很简单.

The Pear Mail Class is straightforward.

如果您使用主机参数作为 URL(如 domain.com)而不是 IP 地址,问题可能依赖于 DNS 超时,请尝试使用 IP 作为主机的域(如 $smtpinfo["host"] = "200.203.201.123";) 代替.

If you are using the host parameter as a URL (like domain.com) instead of an IP address the problem can rely on the DNS timeout, try using IP as the domain for the host (like $smtpinfo["host"] = "200.203.201.123";) instead.

这篇关于PEAR Mail 太慢了,我的前端超时了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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