Email to src

Create Email class and update/rename functions and function calls.
This commit is contained in:
Adam Magness 2017-12-01 14:41:27 -05:00
parent de4a2e6fd0
commit 6008e3df11
10 changed files with 370 additions and 355 deletions

View file

@ -5,8 +5,7 @@
namespace Friendica\Util;
use Friendica\Core\PConfig;
require_once 'include/email.php';
use Friendica\Protocol\Email;
/**
* @breif class to handle emailing
@ -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::emailHeaderEncode(html_entity_decode($params['fromName'], ENT_QUOTES, 'UTF-8'), 'UTF-8');
$messageSubject = Email::emailHeaderEncode(html_entity_decode($params['messageSubject'], ENT_QUOTES, 'UTF-8'), 'UTF-8');
// generate a mime boundary
$mimeBoundary =rand(0, 9)."-"