zend-mail

Send mail with Zend_Mail through Gmail smtp server

余生长醉 提交于 2019-12-10 16:08:23
问题 I'd like to use Gmail smtp server to send email with Zend_Mail . I had this code Zend_Mail::setDefaultTransport(new Zend_Mail_Transport_Smtp("smtp.googlemail.com", array( "auth" => "login", "username" => "myusername@gmail.com", "password" => "mypassword", "ssl" => "ssl", "port" => 465 ))); but when I try to send an email it throws an Exception with message Connection refused . Where I'm wrong? 回答1: Your params are wrong. Give it a shot with these: $config = array( 'ssl' => 'tls', 'port' =>

Why doesn't this mail message decode correctly?

风流意气都作罢 提交于 2019-12-09 01:15:33
问题 I have this code. It's from the Zend Reading Mail example. $message = $mail->getMessage(1); // output first text/plain part $foundPart = null; foreach (new RecursiveIteratorIterator($mail->getMessage(1)) as $part) { try { if (strtok($part->contentType, ';') == 'text/plain') { $foundPart = $part; break; } } catch (Zend_Mail_Exception $e) { // ignore } } if (!$foundPart) { echo 'no plain text part found'; } else { echo $foundPart->getContent(); } What I can get is the message, that works fine.

Magento:exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail

霸气de小男生 提交于 2019-12-08 10:59:56
问题 Magento 1.7, Qmail as smtp, Parallel plesk 10.3, Centos Since a few days one of my magento installation is not sending email, the problem affect only one magento installation. the excepTion log report: 2013-10-14T15:05:41+00:00 ERR (3): exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /var/www/vhosts/domain.ext/httpdocs/lib/Zend/Mail/Transport/Sendmail.php:137 Stack trace: #0 /var/www/vhosts/domain.ext/httpdocs/lib/Zend/Mail/Transport/Abstract.php(348): Zend

Imap IDLE in Zend Framework

你说的曾经没有我的故事 提交于 2019-12-08 05:47:31
问题 I am searching for the IMAP IDLE function in the Zend Framework. I would either like to know whether it is integrated or if it could be done. I have read that the IlohaMail library seems to have implemented the function - at least in a modified version used in roundcube. 回答1: Zend Framework supports issuing the "NOOP" - No operation - command to the IMAP servers to renew the connection. According to http://www.isode.com/whitepapers/imap-idle.html, this resembles the IMAP IDLE process. 来源:

Zend_Mail_Header_HeaderValue::isValid is not valid with special characters

混江龙づ霸主 提交于 2019-12-08 03:31:28
问题 I just encountered an error in an older script (using Zend 1): This is part of an email: --_008_AM2PR07MB0610CE26A6AB7483C300DDC0F4620AM2PR07MB0610eurp_ Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="=?utf-8?B?VmVydHJhdWxpY2hrZWl0c2Vya2zDpHJ1bmdfTGllZmVyYW50ZW5fYmxhbmtv?= =?utf-8?Q?.docx?=" Content-Description: =?utf-8?B?VmVydHJhdWxpY2hrZWl0c2Vya2zDpHJ1bmdfTGllZmVyYW50ZW5fYmxhbmtv?= =?utf-8?Q?.docx?= Content-Disposition: attachment; filename="=

PHP: How to determine email attachment's MIME type?

拈花ヽ惹草 提交于 2019-12-07 10:53:26
I'm using Zend's Zend_Mail_Storage_Pop3 to connect to mail server, open an email, and iterate through its attachments. If the attachment is a PDF, I need to download it. At each iteration of each message part, I call the getHeaders and use Regex to determine the mime type of the attachment. In most cases, I get something like this: ["content-type"]=> string(64) "application/octet-stream; name=abc.pdf" ["content-transfer-encoding"]=> string(6) "base64" But in some cases, I get something like this: multipart/mixed; boundary=--boundary_2_1dca5b3b-499e-4109-b074-d8b5f914404a How do I determine the

Zend_Mail: how to get attachment ID?

不想你离开。 提交于 2019-12-06 14:04:02
问题 I am using Zend to create emails. Now I will place an inline image in the HTML Part of the mail. So I am attaching the image with: $imageContent = file_get_contents(APPLICATION_PATH.'../html/static/img/image.jpg'); $image = $mail->createAttachment($imageContent, 'image/jpeg', Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64, 'image.png'); $imageHeaders = $image->getHeaders(); The last command is for getting the headers, where the part id is not set. But for linking the image in the

Minimizing Zend Framework to Zend_Mail? [duplicate]

帅比萌擦擦* 提交于 2019-12-06 04:58:39
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Use Zend Framework components without the actual framework? I just need the Zend_Mail functions of the Zend Framework, but the whole framework is about 300MB in size. Is there a way to cut it down to just the basics and Zend_Mail to save up some disk space? 回答1: Yes, I have used Zend_Mail with SMTP standalone before, here are the files I needed. I also reduced it down to what you need if you only want to use

Zend_Mail: how to get attachment ID?

喜你入骨 提交于 2019-12-04 19:23:01
I am using Zend to create emails. Now I will place an inline image in the HTML Part of the mail. So I am attaching the image with: $imageContent = file_get_contents(APPLICATION_PATH.'../html/static/img/image.jpg'); $image = $mail->createAttachment($imageContent, 'image/jpeg', Zend_Mime::DISPOSITION_INLINE, Zend_Mime::ENCODING_BASE64, 'image.png'); $imageHeaders = $image->getHeaders(); The last command is for getting the headers, where the part id is not set. But for linking the image in the mail I need the attachment id, so how can you get it? You can set it yourself, see the manual: 36.3.

Minimizing Zend Framework to Zend_Mail? [duplicate]

六眼飞鱼酱① 提交于 2019-12-04 11:31:15
This question already has answers here : Closed 7 years ago . Possible Duplicate: Use Zend Framework components without the actual framework? I just need the Zend_Mail functions of the Zend Framework, but the whole framework is about 300MB in size. Is there a way to cut it down to just the basics and Zend_Mail to save up some disk space? Yes, I have used Zend_Mail with SMTP standalone before, here are the files I needed. I also reduced it down to what you need if you only want to use sendmail also. If you want to use Sendmail, that is the easiest. Your dependencies are: Zend/Exception.php Zend