use Friendica\Content\Text\HTML;
use Friendica\Model\Item;
use Friendica\Util\Strings;
+use \IMAP\Connection;
/**
* Email class
* @param string $mailbox The mailbox name
* @param string $username The username
* @param string $password The password
- * @return resource
+ * @return Connection
* @throws \Exception
*/
public static function connect($mailbox, $username, $password)
$errors = imap_errors();
if (!empty($errors)) {
- Logger::notice('IMAP Errors occured', ['errora' => $errors]);
+ Logger::notice('IMAP Errors occured', ['errors' => $errors]);
}
$alerts = imap_alerts();
}
/**
- * @param resource $mbox mailbox
- * @param string $email_addr email
+ * @param Connection $mbox mailbox
+ * @param string $email_addr email
* @return array
* @throws \Exception
*/
}
/**
- * @param resource $mbox mailbox
- * @param integer $uid user id
+ * @param Connection $mbox mailbox
+ * @param integer $uid user id
* @return mixed
*/
public static function messageMeta($mbox, $uid)
}
/**
- * @param resource $mbox mailbox
- * @param integer $uid user id
- * @param string $reply reply
+ * @param Connection $mbox mailbox
+ * @param integer $uid user id
+ * @param string $reply reply
* @return array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
/**
* fetch the specified message part number with the specified subtype
*
- * @param resource $mbox mailbox
- * @param integer $uid user id
- * @param object $p parts
- * @param integer $partno part number
- * @param string $subtype sub type
+ * @param Connection $mbox mailbox
+ * @param integer $uid user id
+ * @param object $p parts
+ * @param integer $partno part number
+ * @param string $subtype sub type
* @return string
*/
private static function messageGetPart($mbox, $uid, $p, $partno, $subtype)