Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken characters in the notification Email #76

Closed
seonghobae opened this issue Dec 29, 2019 · 4 comments
Closed

Broken characters in the notification Email #76

seonghobae opened this issue Dec 29, 2019 · 4 comments
Assignees

Comments

@seonghobae
Copy link

image

I already converted the database character set with #71 this article. However, I can not see any of the utf8mb4 characters in the email correctly.

So, I make a change to

//Use SMTP or php mail().
if($config->useSMTP === true) {
$this->mailAgent->SMTPDebug = 0; // Enable verbose debug output
$this->mailAgent->Timeout = 20;
$this->mailAgent->isSMTP(); // Set mailer to use SMTP
$this->mailAgent->Host = $config->smtpHosts; // Specify main and backup SMTP servers
$this->mailAgent->SMTPAuth = true; // Enable SMTP authentication
$this->mailAgent->Username = $config->smtpUsername; // SMTP username
$this->mailAgent->Password = $config->smtpPassword; // SMTP password
$this->mailAgent->SMTPSecure = $config->smtpSecure; // Enable TLS encryption, `ssl` also accepted
$this->mailAgent->Port = $config->smtpPort; // TCP port to connect to
like this:

            //Use SMTP or php mail().
            if($config->useSMTP === true) {

                $this->mailAgent->SMTPDebug = 0;                                  // Enable verbose debug output
                $this->mailAgent->Timeout = 20;

                $this->mailAgent->isSMTP();                                      // Set mailer to use SMTP
                $this->mailAgent->Host = $config->smtpHosts;          // Specify main and backup SMTP servers
                $this->mailAgent->SMTPAuth = true;                               // Enable SMTP authentication
                $this->mailAgent->Username = $config->smtpUsername;                 // SMTP username
                $this->mailAgent->Password = $config->smtpPassword;                           // SMTP password
                $this->mailAgent->SMTPSecure = $config->smtpSecure;                            // Enable TLS encryption, `ssl` also accepted
                $this->mailAgent->Port = $config->smtpPort;                                    // TCP port to connect to
                $this->mailAgent->CharSet = 'UTF-8';

This thing is a famous bug (see https://stackoverflow.com/questions/2491475/phpmailer-character-encoding-issues) then I can fix very fast in a minuite.

Best,
Seongho

@marcelfolaron
Copy link
Contributor

Thank you. That saved me a lot of headaches! I'll make sure to include that in the next patch!

@marcelfolaron
Copy link
Contributor

Fixed in V2.0.4

@jerocobo
Copy link

jerocobo commented Aug 6, 2020

I stilll have this problem in 2.1.4 version and it has this "solution" applied...

@kenshin33
Copy link

sorry for the necromancing but as @jerocobo said it is still an issue.
sifting through the code (please keep in mind, I'm no expert), line 86 of class.mailer.php

$this->mailAgent->CharSet = 'UTF-8'; //Ensure UTF-8 is used for emails
seems misplaced to me, it should be outside of the if block in which it is residing (may be line 70 or 87 +).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants