forked from friendica/friendica-addons
[phpmailer] Ensure encoding is UTF-8 even when not using the SMTP configuration
This commit is contained in:
parent
83df923675
commit
341e51f13d
|
@ -37,14 +37,14 @@ function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
|
||||||
// Passing `true` enables exceptions
|
// Passing `true` enables exceptions
|
||||||
$mailer = new PHPMailer(true);
|
$mailer = new PHPMailer(true);
|
||||||
try {
|
try {
|
||||||
|
// Setup encoding.
|
||||||
|
$mailer->CharSet = 'UTF-8';
|
||||||
|
$mailer->Encoding = 'base64';
|
||||||
|
|
||||||
if (DI::config()->get('phpmailer', 'smtp')) {
|
if (DI::config()->get('phpmailer', 'smtp')) {
|
||||||
// Set mailer to use SMTP
|
// Set mailer to use SMTP
|
||||||
$mailer->isSMTP();
|
$mailer->isSMTP();
|
||||||
|
|
||||||
// Setup encoding.
|
|
||||||
$mailer->CharSet = 'UTF-8';
|
|
||||||
$mailer->Encoding = 'base64';
|
|
||||||
|
|
||||||
// Specify main and backup SMTP servers
|
// Specify main and backup SMTP servers
|
||||||
$mailer->Host = DI::config()->get('phpmailer', 'smtp_server');
|
$mailer->Host = DI::config()->get('phpmailer', 'smtp_server');
|
||||||
$mailer->Port = DI::config()->get('phpmailer', 'smtp_port');
|
$mailer->Port = DI::config()->get('phpmailer', 'smtp_port');
|
||||||
|
|
Loading…
Reference in a new issue