14
Check if php mail function is enabled
How to check if mail function is enabled on your server
<?php
$headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
$to = '[email protected]';
$subject = 'Email Subject';
$text = 'Test email body';
if (mail($to, $subject, $text, $headers)) {
echo "Test php mail sent successfully";
} else {
echo"Message delivery failed";
}
?>
Interserver | Standard & VPS Cloud Hosting | $2.50 /Month
Flexible VPS hosting platform to deploy your online projects.
Economical and balanced between processor cores, memory and storage
rated 14 times
(14)
(0)
comments: 0 / hits: 3234
/ 6 years ago, tue, sep 6, 16, 10:42:24
More From
» PHP
Comments
There are no comments for this Snippet yet