X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FEmail.php;h=00122e2eaeb3781b6463aaafb3c9b61815a3962f;hb=1a1300f1bf6d5d81e63405421ba0995a04a9f38a;hp=054a1f4ff769ac55e7b6d833075398c4c651de2e;hpb=26b6cbcb3b15d98c807223d9849a806e6a21ef46;p=friendica.git diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 054a1f4ff7..00122e2eae 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -5,6 +5,7 @@ namespace Friendica\Protocol; use Friendica\Content\Text\HTML; +use Friendica\Core\Protocol; /** * @brief Email class @@ -25,6 +26,16 @@ class Email $mbox = @imap_open($mailbox, $username, $password); + $errors = imap_errors(); + if (!empty($errors)) { + logger('IMAP Errors occured: ' . json_encode($errors)); + } + + $alerts = imap_alerts(); + if (!empty($alerts)) { + logger('IMAP Alerts occured: ' . json_encode($alerts)); + } + return $mbox; } @@ -298,7 +309,7 @@ class Email } /** - * Function send is used by NETWORK_EMAIL and NETWORK_EMAIL2 code + * Function send is used by Protocol::EMAIL and Protocol::EMAIL2 code * (not to notify the user, but to send items to email contacts) * * @param string $addr address @@ -328,7 +339,7 @@ class Email $body .= "Content-Transfer-Encoding: 8bit\n"; $body .= "Content-Type: text/plain; charset=utf-8; format=flowed\n\n"; - $body .= Friendica\Content\Text\HTML::toPlaintext($html)."\n"; + $body .= HTML::toPlaintext($html)."\n"; $body .= "--=_".$part."\n"; $body .= "Content-Transfer-Encoding: 8bit\n";