I am using this code for user forgot password email . but its not giving me the actual output . after submiting the form it brings arabic result and html tags aswell. I am receving html tags too in my mail code:
//......mail
$to = $email;
$subject = 'Forgot Password';
$message = '
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>هل نسيت كلمة المرور</title>
</head>
<body dir="rtl">
</p>
<p align="right">عزيزي،</p>
<p align="right">لقد تلقينا طلبا من جانبكم لاستعادة كلمة المرور. </p>
<p align="right">يتم إلحاق بيانات الدخول الخاصة بك أدناه: </p>
<p align="right">البريد الإلكتروني: <strong>'.$to.'</strong></p>
<p align="right">
كلمة المرور:<strong> '.$password.'</strong><br/>
إلى تسجيل الدخول الرجاء اضغط هنا أو نسخ www.cb.gminns.com/login.php الرابط ولصقه في شريط عنوان المتصفح الخاص بك.
</p>
<br>
<p align="right"> Warm Regards,
Contributors Den Team </p>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "
";
$headers .= "MIME-Version: 1.0
Content-type: text/plain; charset=UTF-8
";
$headers .= "Content-type: text/html; charset=utf-8" . "
";
$headers .= 'From: Contributors Den <noreply@test.com>' . "
";
mail($to, $subject, $message, $headers);
header('location:forgot_password.php?msg=sent');
and the output is giving me like this in my yahoo mail web version ,
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>هل نسيت كلمة المرور</title>
</head>
<body dir="rtl">
</p>
<p align="right">عزيزي،</p>
<p align="right">لقد تلقينا طلبا من جانبكم لاستعادة كلمة المرور. </p>
<p align="right">يتم إلحاق بيانات الدخول الخاصة بك أدناه: </p>
<p align="right">البريد الإلكتروني: <strong>admintest@yahoo.com</strong></p>
<p align="right">
كلمة المرور:<strong> 123</strong><br/>
إلى تسجيل الدخول الرجاء اضغط هنا أو نسخ الرابط ولصقه في شريط عنوان المتصفح الخاص بك.
</p>
</body>
</html>
this is the final email I have received and it brings result with html coding