久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

是什么讓 PHP 的 mail() 函數如此緩慢?

What makes PHP#39;s mail() function so slow?(是什么讓 PHP 的 mail() 函數如此緩慢?)
本文介紹了是什么讓 PHP 的 mail() 函數如此緩慢?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在我的服務器上創(chuàng)建了一個包含對 mail() 調用的快速 PHP 腳本并開始測試它.html 頁面總是立即加載,所以我認為這意味著包含對 mail() 調用的 PHP 已完成執(zhí)行.但是,從 mail() 發(fā)送的電子郵件只會在通話后每 10-20 分鐘收到一次.為什么延遲?mail() 是否觸發(fā)外部程序?(如果相關,電子郵件將發(fā)送到 Gmail 電子郵件帳戶)

I made a quick PHP script on my server containing a call to mail() and started testing it. The html page always loads instantly, so I assume that means the PHP containing the call to mail() is finished executing. However, the emails sent from mail() are only ever being received every 10-20 minutes after the call. Why the delay? Does mail() trigger external programs? (the emails are being sent to a gmail email account if that's relevant)

推薦答案

您所看到的行為與 PHP 的 mail() 函數無關.相反,它是 PHP 將消息傳遞到的 SMTP 郵件服務器,這需要時間來傳遞.該服務稱為郵件傳輸代理或 MTA.

The behavior you are seeing has nothing to do with PHP's mail() function. Instead, it is the SMTP mail server which PHP hands off the message to, which is taking time to deliver. That service is known as a mail transport agent, or MTA.

無法立即交付的潛在原因有很多.可能,您看到的延遲是接收服務器上的灰名單,這意味著接收郵件服務器拒絕接受消息,直到發(fā)送服務器(您的 PHP 腳本將其交給)嘗試重新發(fā)送幾次.表現良好的 MTA 會重試失敗的發(fā)送嘗試,但垃圾郵件服務器通常不會,這使得這是減少垃圾郵件的一種簡單而有效的方法.

There are lots of potential reasons it won't be delivered immediately. Possibly, the delay you see is greylisting on the receiving server, meaning that the receiving mail server refuses to accept the message until the sending server (which your PHP script handed it to) tries a few times to resend it. Well-behaved MTA's will retry failed send attempts, but spam servers often don't, making this a simple but effective method for cutting down spam.

它甚至可以像 SMTP 服務器上等待發(fā)送的長消息隊列一樣簡單,而您的消息正在排隊等候.(不過,真正列入灰名單的可能性更大)

It could even be as simple as a long queue of messages on the SMTP server waiting to be sent, whereby yours are waiting in line. (Really greylisting is more probable though)

最重要的是要記住,電子郵件是即時的,因此永遠不能保證是即時的.在過去十年左右的時間里,我們基本上已經習慣了電子郵件的快速發(fā)送,但您永遠無法保證快速發(fā)送.

Most important to remember though is that email is not intended to be instantaneous and therefore never guaranteed to be instantaneous. In the past decade or so we've gotten accustomed by and large to email being delivered really quickly, but you can never promise quick delivery.

這篇關于是什么讓 PHP 的 mail() 函數如此緩慢?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 99精品国自产在线 | 久久精品无码一区二区三区 | 精品国产一区二区三区久久久四川 | 亚洲一区国产精品 | 国产视频第一页 | 一区二区三区中文字幕 | 99久久精品免费看国产高清 | 国产高清视频一区 | 久久99精品久久久久久琪琪 | 欧美极品在线观看 | 波波电影院一区二区三区 | 亚洲成人精品在线观看 | 久久久久国产成人精品亚洲午夜 | 一区二区三区av夏目彩春 | 亚洲精品一区二区三区蜜桃久 | 国产电影一区二区在线观看 | 午夜欧美 | 国精产品一区二区三区 | 亚洲97 | 先锋资源吧| 在线看av网址 | 亚洲欧美中文字幕在线观看 | 国产sm主人调教女m视频 | 久久久毛片 | 国产一区二区三区在线视频 | 国产精品久久精品 | 日本三级在线网站 | 亚洲精品国产第一综合99久久 | 亚洲欧洲精品在线 | 日韩毛片 | 国产黄a一级| 欧美福利久久 | 国产一区二区三区在线免费 | eeuss国产一区二区三区四区 | 久草日韩| 久久久精品一区二区三区四季av | 成人一区二区三区视频 | 日韩一区二区三区av | 日韩欧美在线一区 | 成人精品一区二区 | 国产福利在线视频 |