Email to src
Create Email class and update/rename functions and function calls.
This commit is contained in:
parent
de4a2e6fd0
commit
6008e3df11
10 changed files with 370 additions and 355 deletions
|
@ -11,8 +11,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once('include/email.php');
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
function invite_post(App $a) {
|
||||
|
||||
|
@ -78,7 +77,7 @@ function invite_post(App $a) {
|
|||
$nmessage = $message;
|
||||
}
|
||||
|
||||
$res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'),
|
||||
$res = mail($recip, Email::emailHeaderEncode(t('Please join us on Friendica'),'UTF-8'),
|
||||
$nmessage,
|
||||
"From: " . $a->user['email'] . "\n"
|
||||
. 'Content-type: text/plain; charset=UTF-8' . "\n"
|
||||
|
|
|
@ -24,11 +24,11 @@ use Friendica\Model\GlobalContact;
|
|||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\Emailer;
|
||||
|
||||
require_once 'include/crypto.php';
|
||||
require_once 'include/enotify.php';
|
||||
require_once 'include/email.php';
|
||||
require_once 'include/tags.php';
|
||||
require_once 'include/files.php';
|
||||
require_once 'include/threads.php';
|
||||
|
@ -1030,9 +1030,9 @@ function item_post(App $a) {
|
|||
$disclaimer .= sprintf( t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||
if (!$datarray['title']=='') {
|
||||
$subject = email_header_encode($datarray['title'], 'UTF-8');
|
||||
$subject = Email::emailHeaderEncode($datarray['title'], 'UTF-8');
|
||||
} else {
|
||||
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'), $a->user['username']), 'UTF-8');
|
||||
$subject = Email::emailHeaderEncode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'), $a->user['username']), 'UTF-8');
|
||||
}
|
||||
$link = '<a href="' . System::baseUrl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
|
||||
$html = prepare_body($datarray);
|
||||
|
|
|
@ -10,6 +10,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
require_once 'include/group.php';
|
||||
|
||||
|
@ -259,12 +260,12 @@ function settings_post(App $a) {
|
|||
);
|
||||
if (DBM::is_result($r)) {
|
||||
$eacct = $r[0];
|
||||
require_once('include/email.php');
|
||||
$mb = construct_mailbox_name($eacct);
|
||||
$mb = Email::constructMailboxName($eacct);
|
||||
|
||||
if (strlen($eacct['server'])) {
|
||||
$dcrpass = '';
|
||||
openssl_private_decrypt(hex2bin($eacct['pass']), $dcrpass, $a->user['prvkey']);
|
||||
$mbox = email_connect($mb, $mail_user, $dcrpass);
|
||||
$mbox = Email::emailConnect($mb, $mail_user, $dcrpass);
|
||||
unset($dcrpass);
|
||||
if (!$mbox) {
|
||||
$failed = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue