zend-mail

Send mail without blocking 'execution'

不羁岁月 提交于 2020-01-21 08:58:47
问题 I'm using Zend_Mail in a Zend Framework application to send an e-mail with the contents of a web-based contact form. The mailing itself works fine ( im using a Google Apps account ) but it can take fairly long to process ( ranging from a few seconds to nearly a minute ). My controler action would normally redirect the visitor after sending the mail, so I thought I might be able to redirect the visitor prior to calling $mail->send() and let the script continue in the 'background': So I tried

How do you add an email filter to an IMAP email account?

萝らか妹 提交于 2019-12-25 06:26:35
问题 I'm using PHP (zend_mail_storage_imap specifically). I built the first iteration of an email product a few days ago. Basically, I flag and filter a number of emails using zend_mail and an imap email account. The problem is that I'm currently searching the email address every five minutes to see if a new email was received. I'd like to change this by placing a filter in IMAP itself - a filter similar to GMAIL filters. Would this be possible to set this up directly in IMAP? If not, what would

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

为君一笑 提交于 2019-12-23 03:47:06
问题 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

sending ical through zend_mail

孤街浪徒 提交于 2019-12-22 12:44:29
问题 Can someone guide me in right direction. I am trying to send my all calendar events to my users using mail. I have a php function which is working as per my expectations. I am trying to implement the same functionality in zend framework using zend_mail. Here is the function that is working. function sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration) { $from_name = "RK"; $from_address = "m.ravikant10@gmail.com"; $subject = "Meeting Booking"; //Doubles as

Zend_Mail sent email is treated as SPAM

空扰寡人 提交于 2019-12-18 16:55:30
问题 Please tell me what I am doing wrong. I am sending an email using the Zend_Mail class like this: $message = <<<STR You have a new invoice! Sign in to your clientarea to see it. Best regards, Company name STR; $mail = new Zend_Mail(); $mail->setBodyText($message); $mail->setFrom('billing@company.com', 'Company.com'); $mail->addTo('client@email.com', 'Client Name'); $mail->setSubject('You have a new invoice!'); $mail->send(); It is received as a spam though. There are other applications such as

Email decoding doesn't work in zend mail

…衆ロ難τιáo~ 提交于 2019-12-12 02:35:28
问题 I have a script that access the specified email and fetches mail. $temp->getContent() echos the following.. ----boundary_2710_edfb8b44-71c8-49ff-a8cb-88c83382c4ee Content-Type: multipart/alternative; boundary=--boundary_2709_dde0dd0e-ba35-4469-949d-5392aec65750 --boundary_2709_dde0dd0e-ba35-4469-949d-5392aec65750 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 PGZvcm0gbWV0aG9k.........this part is base64 encoded and it works fine if i copy and decode it separately....

ZendMail - error in headers

↘锁芯ラ 提交于 2019-12-11 23:07:39
问题 Fatal error: Uncaught exception 'Zend\Mail\Exception\RuntimeException' with message 'Malformed header detected' in /var/www/html/plugins/ZendFramework/ZendFramework-2.4.7/library/Zend/Mail/Headers.php on line 88 This is the error message that I get when I try use the Zend\Mail\Storage\Imap::getMessage() function. If I comment out the line, where the error is thrown(to be more precise I have to comment out both lines where this same error is thrown from the same function), I am able to read

Send email SMTP from localhost with WAMP setup

流过昼夜 提交于 2019-12-11 09:00:35
问题 I'm trying to configure my php.ini file so I can send emails from 'localhost' in my dev environment using PHP. I no longer have access to an open SMTP server, and Gmail no longer works with their new SSL setup. I've done a lot of research and seen lots of "solutions" here and elsewhere, but they don't work. I've tried installing local SMTP servers (hMailServer asks for a password to install, Free SMTP Server doesn't work, etc). Does anyone know of a free SMTP server I can setup in my php.ini

PHP stream_socket_client ignoring timeout

自古美人都是妖i 提交于 2019-12-11 05:38:09
问题 I'm using zend_mail from zend-framework2 in my project to send some amount of emails in a loop, but sometimes it takes more than usual to send an email. After doing some research, i found that the delay occurs on the stream_socket_client function. I tried to set this function's timeout to acceptable value, but it seems to ignore that setting. Also tried to use STREAM_CLIENT_PERSISTENT to limit the number of opened sockets but with no luck. Average stream_socket_client times are about 0.03

Multiple Zend_Mail configurations in application.ini

五迷三道 提交于 2019-12-10 22:06:14
问题 I'm am using Zend Framework. I need to put multiple mail configurations in application.ini for Zend_Mail (using Zend_Application_Resource_Mail). Is it possible to do this using the standard classes in Zend Framework or do I need to create my own class? I am using the latest stable version of Zend Framework. Thanks for the answers 回答1: It does not appear to be possible to set multiple configurations for Zend_Mail with Zend_Application_Resource_Mail. You could add the various configurations to