Guide to PHP and MySQL (University at Buffalo Version)
Chapter 11: Sending Email with PHP
The PHP mail() functions provides a way to send an email message from your web site. To send your web server must be running an SMTP (Simple Mail Tranfer Protocal) mail server.
Using fake sendmail on a WAMP Server localhost
To send email via your localhost WampServer on Windows via a Gmail accont download fake sendmail for windows. Extract the sendmail.zip file to your \www\sendmail\ folder. Then edit the sendmail.ini file and change these values:
Edit the php.ini File
Next edit your php.ini file. Execute your phpinfo.php file from your localhost web server to find the full path to the Loaded Configuration File setting to find here the php.ini file resides. For the WAMPServer it might be C:\wamp64\bin\php\php5.6.25\phpForApache.ini on a 64-bit Windows machine or c:\wamp\bin\php\php5.6.25\phpForApache.ini on a 32-bit Windows machine (the PHP version may be different). Change the sendmail_path setting:
Sending Email with PHP
The PHP mail() functions provides a way to send an email message from your web site. A sample sendmail.php file:
Here is the body of the email message that is received:
Task - Send an Email Using PHP
You will modify the PHP function for this item in your index.php page to add a link to your web site files that allows me to view your work.
You *MUST* use the W3C Unicorn Validator to validate your HTML5/CSS3 code.