hey geeks,
I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and 'ö'. Whatever I try, I can't get these characters to display properly everywhere. In some email clients, these characters show up just fine, whereas in others they show up as question marks or kinda boxes. I've tried sending the mail as UTF-8, as ISO-8859- but I'm seriously stumped.
How do I send a mail from PHP using any characters while guaranteeing that the mail shows up the same everywhere?
I am using Wift Mailer library in order to send email.
Here is my swift mailer script settings
Kindly help me out to sort out my problem.
I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and 'ö'. Whatever I try, I can't get these characters to display properly everywhere. In some email clients, these characters show up just fine, whereas in others they show up as question marks or kinda boxes. I've tried sending the mail as UTF-8, as ISO-8859- but I'm seriously stumped.
How do I send a mail from PHP using any characters while guaranteeing that the mail shows up the same everywhere?
I am using Wift Mailer library in order to send email.
Here is my swift mailer script settings
Code:
require_once 'lib/swift_required.php'; $transport = Swift_MailTransport::newInstance(); //Create the Mailer using your created Transport $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance() ->setSubject($subject) ->setTo(array($cust_email => $name)) ->setFrom(array('info@mohsinrafique.com' => 'Mohsin Rafique')) ->setSender('noreply@mohsinrafique.com') ->setReturnPath('bounce@mohsinrafique.com') ->setPriority(3) ->setCharset('utf-8') ->setBody($messagebody, 'text/html');
Kindly help me out to sort out my problem.
Comment