Knowledgebase: Cpanel Control Panel > PHP
A simple script to check PHP Mail Function is working.
Posted by - NA - on 18 March 2010 03:42 AM
|
|
You can use the following php mail script to check PHP Mail Function is working or not. ______________________________ <?php $to = "user@domain.com"; $subject = "PHP Mail Function Successful"; $message = "This email was sent via PHP's mail() function."; $result = mail($to,"$subject ",$message, "From:PHPMail-Script"); if ($result){ echo ('Mail Sent'); } else { echo('Error Sending Mail'); } ?> ______________________________ | |
|
Comments (0)