mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-24 16:40:16 +00:00
Merge pull request #1049 from MrPetovan/bug/9572-phpmailer-encoding
[phpmailer] Ensure encoding is UTF-8 even when not using the SMTP configuration
This commit is contained in:
commit
52d86afc5c
1 changed files with 4 additions and 4 deletions
|
@ -37,14 +37,14 @@ function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
|
|||
// Passing `true` enables exceptions
|
||||
$mailer = new PHPMailer(true);
|
||||
try {
|
||||
if (DI::config()->get('phpmailer', 'smtp')) {
|
||||
// Set mailer to use SMTP
|
||||
$mailer->isSMTP();
|
||||
|
||||
// Setup encoding.
|
||||
$mailer->CharSet = 'UTF-8';
|
||||
$mailer->Encoding = 'base64';
|
||||
|
||||
if (DI::config()->get('phpmailer', 'smtp')) {
|
||||
// Set mailer to use SMTP
|
||||
$mailer->isSMTP();
|
||||
|
||||
// Specify main and backup SMTP servers
|
||||
$mailer->Host = DI::config()->get('phpmailer', 'smtp_server');
|
||||
$mailer->Port = DI::config()->get('phpmailer', 'smtp_port');
|
||||
|
|
Loading…
Reference in a new issue