Page 1 of 1

How does PHP mail work?

Posted: Fri Nov 04, 2016 9:51 am
by Jansi Jain
please explain this.

Re: How does PHP mail work?

Posted: Mon Nov 07, 2016 10:33 am
by admin
The operation of the mail function depends on the OS you're using. If you're running on Windows then you need to configure an SMTP relay in your php.ini file. If your OS is some variant of Unix or Linux your php.ini will specify the path to the Send mail executable, or an executable that can respond in the same way as send mail. In an IT context, globally you call the mail () function, provide the function with the sender and receiver email address, the actual content you want, and some optional SMTP headers. The function will then look up the address of the mail server indicated in the php.ini configuration file, and open a network connection to that server.