Rohit Gilbile
Rohit Gilbile

Reputation: 21

Wordpress mail return false

I am using wordpress mail and it returning me false. pleas help me to checkout what's wrong in code.

$headers .= 'Content-Type: text/html; charset=ISO-8859-1' . "\r\n"; 
$headers .= 'From: [email protected]';
$to ='[email protected]';
$mail_resp = wp_mail( $to , 'The subject', 'The message',$headers );
    if($mail_resp){
echo "Mail send Sucessfully";
}
 else{
    echo "Mail Not send";
 } 

i am getting response mail not send Please help me to out of this what's wrong in this.

Thanks in advance

Upvotes: 0

Views: 6974

Answers (1)

tzafar
tzafar

Reputation: 664

Try this one

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-Type: text/html; charset=ISO-8859-1' . "\r\n";
$headers .= 'From: [email protected]' . "\r\n";

Upvotes: 1

Related Questions