gpt4 book ai didi

php - 在 mail() 函数中指定端口

转载 作者:行者123 更新时间:2023-12-04 18:18:56 25 4
gpt4 key购买 nike

I haven't found a coherent answer to my quesion here :(

我的服务器的 ISP 已经阻止了默认的 SMTP 端口,所以我需要手动将其从 25 切换到 587。

mail("example@example.com","Hello","World"); //This uses the default value

PS。
我不知道为什么答案被删除 - that link非常有用......但是,我想它可以以更简单的方式完成。

最佳答案

您应该使用 ini_set 函数

ini_set("smtp_port", "587");

关于php - 在 mail() 函数中指定端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11107761/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com