#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    PHP Mailer encoding problem


    Hello. I am using PHP Mailer for PHP 5/6 and i am facing a problem. I am using a php function to send the final mail:

    function MailSender($user, $text)

    which takes two extra paramaters that contains greek text. And here is the problem. When the mail comes to my inbox contains unreadable characters for these two parameters. Although, if i write by myself the greek text in the body of php mailer, it comes corrent to my inbox without strange characters. And as i guess is a matter of these two paramaters.

    I set the charset of php mailer to utf-8 but with no success. I used utf8_encode() and mb_convert_encoding() for the paramaters but nothing again. Any ideas?

    Thank you in advance.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    which takes two extra paramaters that contains greek text. And here is the problem. When the mail comes to my inbox contains unreadable characters for these two parameters. Although, if i write by myself the greek text in the body of php mailer, it comes corrent to my inbox without strange characters.
    That makes me think that the problem is not with PHPMailer, but with whatever code you're using to populate the two parameters.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo