简体   繁体   中英

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

我正在处理现有项目,我看到我们调用了邮件功能 ,但是我看不到我们指定smtp服务器名称密码等的任何地方。我猜它在某些文件中但是在哪里?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM