Fix storing mail settings
This commit is contained in:
parent
e351122cc5
commit
421dd028ce
2 changed files with 16 additions and 15 deletions
|
@ -108,7 +108,7 @@ function settings_post(App $a)
|
||||||
'port' => $mail_port,
|
'port' => $mail_port,
|
||||||
'ssltype' => $mail_ssl,
|
'ssltype' => $mail_ssl,
|
||||||
'user' => $mail_user,
|
'user' => $mail_user,
|
||||||
`action` => $mail_action,
|
'action' => $mail_action,
|
||||||
'movetofolder' => $mail_movetofolder,
|
'movetofolder' => $mail_movetofolder,
|
||||||
'mailbox' => 'INBOX',
|
'mailbox' => 'INBOX',
|
||||||
'reply_to' => $mail_replyto,
|
'reply_to' => $mail_replyto,
|
||||||
|
|
|
@ -27,6 +27,7 @@ use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
use \IMAP\Connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email class
|
* Email class
|
||||||
|
@ -37,7 +38,7 @@ class Email
|
||||||
* @param string $mailbox The mailbox name
|
* @param string $mailbox The mailbox name
|
||||||
* @param string $username The username
|
* @param string $username The username
|
||||||
* @param string $password The password
|
* @param string $password The password
|
||||||
* @return resource
|
* @return Connection
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function connect($mailbox, $username, $password)
|
public static function connect($mailbox, $username, $password)
|
||||||
|
@ -50,7 +51,7 @@ class Email
|
||||||
|
|
||||||
$errors = imap_errors();
|
$errors = imap_errors();
|
||||||
if (!empty($errors)) {
|
if (!empty($errors)) {
|
||||||
Logger::notice('IMAP Errors occured', ['errora' => $errors]);
|
Logger::notice('IMAP Errors occured', ['errors' => $errors]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$alerts = imap_alerts();
|
$alerts = imap_alerts();
|
||||||
|
@ -62,8 +63,8 @@ class Email
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $mbox mailbox
|
* @param Connection $mbox mailbox
|
||||||
* @param string $email_addr email
|
* @param string $email_addr email
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
|
@ -112,8 +113,8 @@ class Email
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $mbox mailbox
|
* @param Connection $mbox mailbox
|
||||||
* @param integer $uid user id
|
* @param integer $uid user id
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function messageMeta($mbox, $uid)
|
public static function messageMeta($mbox, $uid)
|
||||||
|
@ -123,9 +124,9 @@ class Email
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $mbox mailbox
|
* @param Connection $mbox mailbox
|
||||||
* @param integer $uid user id
|
* @param integer $uid user id
|
||||||
* @param string $reply reply
|
* @param string $reply reply
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
|
@ -210,11 +211,11 @@ class Email
|
||||||
/**
|
/**
|
||||||
* fetch the specified message part number with the specified subtype
|
* fetch the specified message part number with the specified subtype
|
||||||
*
|
*
|
||||||
* @param resource $mbox mailbox
|
* @param Connection $mbox mailbox
|
||||||
* @param integer $uid user id
|
* @param integer $uid user id
|
||||||
* @param object $p parts
|
* @param object $p parts
|
||||||
* @param integer $partno part number
|
* @param integer $partno part number
|
||||||
* @param string $subtype sub type
|
* @param string $subtype sub type
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function messageGetPart($mbox, $uid, $p, $partno, $subtype)
|
private static function messageGetPart($mbox, $uid, $p, $partno, $subtype)
|
||||||
|
|
Loading…
Reference in a new issue