我正在阅读php mail()
函数文档,但我错过了一些配置字段,例如user
或passsword
。
我知道smtp服务器设置在php.ini
上,但我没有看到任何设置user
和password
的内容。
如何将要将电子邮件发送给发件人的用户设置为发件人?
答案 0 :(得分:0)
如果您只需要设置用户并通过,此脚本将为您提供帮助。它的工作正常
SMTP = smtp.example.com
smtp_port = 25
username = info@example.com
password = yourmailpassord
sendmail_from = info@example.com