Zend mail – cannot read – connection closed?
Using the zend mail php package to connect to Gmail and getting an error
My Method looks like
//Get all mail
public function GetMail() {
$mail = new Imap([
'host' => 'imap.gmail.com',
'ssl' => 'tls',
'port' => '993',
'user' => 'example@gmail.com',
'password' => '*********',
]);
echo $mail->countMessages() . " messages foundn";
foreach ($mail as $message) {
printf("Mail from '%s': %sn", $message->from, $message->subject);
}
}
The error is as follows:
cannot read – connection closed?
Using Laravel as a framework
from Laravel Questions and Answers https://laravelquestions.com/laravel/zend-mail-cannot-read-connection-closed/
via Lzo Media
No comments:
Post a Comment