Do I need an SMTP server when using the PHP mail () function?
ps I am in the share hosting account, so I can not install the SMTP server, and they do not provide this.
The PHP mail () function does not require SMTP. It uses a program called sendmail , which is usually available on Unix / Linux platforms by default, and most web hosts provide this service at no extra charge.
PHP on Linux servers uses the local MTA for the mail () function.
PHP on Windows can be configured to use any SMTP server you like.
PEAR :: Mail allows you to specify which SMTP server you want to use. http://pear.php.net/manual/en/package.mail.mail.intro.php
With the first parameter as "smtp", the second parameter receives data. http://pear.php.net/manual/en/package.mail.mail.factory.php