How to use PHP & Send Email This the tutorial/example a scripts how to use PHP and send mail/email from php Scirpt.
ShotDev Focus:
- PHP & Send Mail
Example
php_sendmail.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <? $strTo = "member@shotdev.com"; $strSubject = "Test sending mail."; $strHeader = "From: webmaster@shotdev.com"; $strMessage = "My Body & My Description"; $flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No show error // if($flgSend) { echo "Mail send completed."; } else { echo "Cannot send mail."; } ?> </body> </html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_sendmail.php
Screenshot