Send text version of confirmation email
[[MAILPOET-1966]
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace MailPoet\Subscribers;
|
namespace MailPoet\Subscribers;
|
||||||
|
|
||||||
|
use Html2Text\Html2Text;
|
||||||
use MailPoet\Mailer\Mailer;
|
use MailPoet\Mailer\Mailer;
|
||||||
use MailPoet\Models\Subscriber;
|
use MailPoet\Models\Subscriber;
|
||||||
use MailPoet\Settings\SettingsController;
|
use MailPoet\Settings\SettingsController;
|
||||||
@@ -72,13 +73,16 @@ class ConfirmationEmailMailer {
|
|||||||
'activation_link'
|
'activation_link'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//create a text version. @ is important here, Html2Text throws warnings
|
||||||
|
$text = @Html2Text::convert((mb_detect_encoding($body, 'UTF-8', true)) ? $body : utf8_encode($body));
|
||||||
|
|
||||||
// build email data
|
// build email data
|
||||||
$email = array(
|
$email = array(
|
||||||
'subject' => $signup_confirmation['subject'],
|
'subject' => $signup_confirmation['subject'],
|
||||||
'body' => array(
|
'body' => [
|
||||||
'html' => $body,
|
'html' => $body,
|
||||||
'text' => $body
|
'text' => $text,
|
||||||
)
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
// set from
|
// set from
|
||||||
|
Reference in New Issue
Block a user