Skip to main content

How to send the Arabic email through PHP

<        ?          php

$to = "info@bestvisualization.com";

$subject = "You have received the new email";

$body = "

FULL NAME:".$_POST['T1']."

GENDER:".$_POST['T2']."

CITY:".$_POST['T3']."

MOBILE NUMBER:".$_POST['T4']."

LAND LINE NUMBER:".$_POST['T5']."

DATE OF BIRTH:".$_POST['T6']."

ID NUMBER:".$_POST['T7']."

ANSWER FIELD:".$_POST['T8']."



";

$fromName = "Rashid Bilgrami";

$fromAddress = "info@bestvisualization.com";



$headers = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From: '. $fromName . "<".$fromAddress.">" . "\r\n";





if (mail($to, $subject, $body, $header)) {

echo("<p>Message successfully sent!</p>");

} else {

echo("<p>Message delivery failed...</p>");

}

?    >

Note the most important thing you need to save this email  code in UTF-8 format (Tip: opent he file in notepad and select the UTF-8 format in the drop down where ANI is present)

this code is 100% testing and working on the website 

Regards
Rashid Bilgrami
CEO
Best visualization
http://www.bestvisualization.com 

Comments

  1. what do you mean save the email? i tried this code but when i check my email client the arabic parts are unreadable.

    ReplyDelete

Post a Comment

Thanks for the Comments , Your review will display soon