To test if mail() function exist in your server you can try this few lines of codes.
<?php
if ( function_exists( 'mail') )
echo 'mail() is enable';
else
echo 'mail() has been disabled';
?>
If the result above is false/mail is disabled then maybe you need to add the solution I’ve provided below or else of course your mail() code does not formatted correctly
First Steps:
<?php
// Add this code before mail() function.
ini_set('SMTP','localhost');
ini_set("sendmail_from", "info@example.com");
?>
Second Steps:
If first steps doesn’t work for you then you need to look a bit in your code header area.
From
$headers .= 'From: Name <address@example.com>'. "\r\n";
To
$headers .= 'From: address@example.com'. "\r\n";
No comments:
Post a Comment
Note: only a member of this blog may post a comment.