开发者

How does php mail function know which mail server to use?

I'm working开发者_高级运维 on existing project and I see that we make a call to mail function, however I don't see anywhere where we specify smtp server name password etc... My guess it is in some file but where?


You can configure the behavior of the mail functions in php via the php.ini, and some can be set with ini_set (per http://www.php.net/manual/en/configuration.changes.modes.php)

Email configuration options can be found here: http://www.php.net/manual/en/mail.configuration.php


That's because it uses the local OS "mail" command. It uses whatever the operating system is configured to use. If you want to use and SMTP server, name and password, use SwiftMailer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜