X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FEmailer.php;h=7d4205ac3346ec779a34b90024d9b94a4220dc08;hb=7099a54b3d209bd5eb04613010ac3484563f0c45;hp=a2be983d6c03cb7ca78645831b5b836639161700;hpb=2d6ee38446380ec3bc65b6158ba7e013ac92748e;p=friendica.git diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php index a2be983d6c..7d4205ac33 100644 --- a/src/Util/Emailer.php +++ b/src/Util/Emailer.php @@ -5,11 +5,10 @@ namespace Friendica\Util; use Friendica\Core\PConfig; - -require_once 'include/email.php'; +use Friendica\Protocol\Email; /** - * @breif class to handle emailing + * @brief class to handle emailing */ class Emailer { @@ -38,8 +37,8 @@ class Emailer $email_textonly = PConfig::get($params['uid'], "system", "email_textonly"); } - $fromName = email_header_encode(html_entity_decode($params['fromName'], ENT_QUOTES, 'UTF-8'), 'UTF-8'); - $messageSubject = email_header_encode(html_entity_decode($params['messageSubject'], ENT_QUOTES, 'UTF-8'), 'UTF-8'); + $fromName = Email::encodeHeader(html_entity_decode($params['fromName'], ENT_QUOTES, 'UTF-8'), 'UTF-8'); + $messageSubject = Email::encodeHeader(html_entity_decode($params['messageSubject'], ENT_QUOTES, 'UTF-8'), 'UTF-8'); // generate a mime boundary $mimeBoundary =rand(0, 9)."-"