Outgoing email is sent using the Simple Mail Transfer Protocol (SMTP). Fortunately, PHP's built-in
mail() function handles all SMTP socket-level protocols and handshaking for you. The
mail() function acts as your mail client, sending email messages just as Outlook or Thunderbird might.
Before you can use PHP as a mail client, you must edit PHP's configuration file, php.ini, to point PHP to the mail server's location. For example, the script in Listing 16-1 shows the section of php.ini that configures PHP to work with sendmail, the Unix mail server on many networks.
[mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. ;sendmail_from = email@example.com ; For Unix only. You may ...