Email through PHPMailer is slow

限于喜欢 提交于 2019-12-03 20:08:25

I had that too:It is because PPHmailer works with uniqid() to create its boundary strings, which, on certain hosts, is very slow. By adding the 2. parameter more_entropy to true, I solved that problem.

In the file class.phpmailer.php around line 1379:

public function CreateHeader() {
    $result = '';

    // Set the boundaries
    $uniq_id = md5(uniqid(time(), true)); // adding 2. param more_entropy (true)
    // ....

From the docs

uniqid:

more_entropy

If set to TRUE, uniqid() will add additional entropy (using the combined linear congruential generator) at the end of the return value, which increases the likelihood that the result will be unique.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!