I found several examples of sending a single email attachment using zend_mail. But I cannot figure out how to send multiple attachments. Can someone share how to do this if it is possible. I have sendmail installed on the server.
Yes its possible to send more than one attachment in a Zend_Mail_Message.
Depending on what method you use for creating attachments, just call $mail->createAttachment() once per attachment, or create all of your attachments as Zend_Mime_Part objects and call $mail->addAttachment($part) once for each attachment.
See Zend Mail Attachments for examples. Just repeat the example once for each file you want to attach.
Related
I have to create email tracking system, but the problem is that when the sender opens an email this is counted as an opening by the recipient.
When I send an email through Polymail (or some other tools for tracking emails), then in the 'sent' folder I have an email without a tracking pixel, but the recipients of this email have the pixel and at the same time everyone have different code inside (I think, to determine which of the recipients opened the email).
How is this possible? The sender and the recipients have different contents of the same email. Can this be implemented using smtp / imap / gmail-api?
For standard IMAP/SMTP setups (specifically: not GMail), the message is submitted twice, once to SMTP to be sent, and again to IMAP to be placed in the Sent mailbox.
There is no requirement that these be the same: in fact, in normal use, the BCC header, for example, is submitted to IMAP, but not SMTP.
GMail, and a few others, while trying to be helpful and save bandwidth, do the copy automatically, but make it impossible to supply different versions. (Unless you want to try to find the duplicates and delete them out of band).
Current Email protocols don't send any kind of ACK to the Sender when mail is opened. So you need to put some kind of analytic tool inside the mail contents to keep the track of it.
Some suggested methods and widely used tool is Bananatag.
Alternatively, you can use custom Google Analytics for the same. Refer here https://dyn.com/blog/tracking-email-opens-via-google-analytics/
I'm currently writing on an Outlook VSTO AddIn. Using this AddIn, I would like to keep track of E-Mail conversations and be able to uniquely identify mail messages. We are using Exchange as MTA.
For all the mails in the Inbox (and many other folders) I can use the Message ID from the mail's header to do the matching, but mails lying in the "Sent Items" folder do not have a Message ID set.
Is there a way to get the Message IDs from those mails?
(I guess that the mails do not have a header, as they are placed in the folder before being sent; but after sending the mail, the MTA gives a message with status code 250 which contains the Message ID.) Does Outlook know about or somehow save the MessageID? How can Outlook keep track of conversations, if it doesn't know the MessageID?
Is there another way to identify a mail?
First let us clarify why do you mean by
Is there another way to identify a mail
Actually you can duplicate an email then, they will have the same MessageID but different ItemId. If you have multiple recipients: toms#gmail.com, toms#an.exchange.mailbox.com, toms2#an.exchange.mailbox.com they will have the same MessageID (aka InternetMessageId) even the first one is not even Exchange. For the two others, there are two different messages within the same Exchange server. The have differents ItemID(aka EntryId).
Conclusion, the MessageID identifies the mail from its content and is set by the mailserver sending the email. To my knowledge there is no alternative (except creating your own "digest") from the immutable properties of an email. Keep also in mind that 'ItemId' changes when you move an email from a folder to another. See
For a VSTO add-in you can retrieve the MessageID aka InternetMessageId using Redemption.
The other alternative is to ask the ExchangeServer using MAPI or EWS.
In all cases there will be a 'server call' and it cannot be retrieve directly after sending because this property is set by Exchange Mail server.
In my application I have to send a mail to two recipients. One person is added as a To recipient and another as a CC recipient.
I am attaching two files to the mail; a PDF file, and an Excel file. I desire that the CC recipients receive both files, and the To recipients receive only the PDF file. How do I implement this?
May be u can try sending two emails, one with pdf attached and other with pdf and excel attached, both with same recepients.
I dont know whether there is any other solution, coz I dont see any option in any email clients to attach a file for a particular recepient.
I have a task which is related to sending mail without connection or MFmailcomposer.
Simply i am doing work on a form which have to sent a single mail-id. when the form fills up and user perform the action for sending then sent mail to the client without MFmailcomposer and webservice if connection available else if Wi-fi is not available then filled form text file will save in documents directory.and when iPhone comes in connection then automatically it sent to that mail -id. document is saving as text file. but now what to do ?
Is SMTP is useful for it?
suggest me...
the below link could help you...
http://www.raddonline.com/blogs/geek-journal/iphone-sdk-testing-network-reachability/
You would definitely have to implement this functionality with SMTP.
Check the answer to this SO Post, Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
Includes several links to different SMTP Libraries, as well as example code.
I want to create a new software that can be controlled by email.
It will work like followup.cc or followupthen.com.
The users of these softwares can give commands to the system by using only email. For example, sending an email to 1minute#followup.cc sets the system to send a notification email after 1 minute. Or sending an email to 4weeks#followup.cc sets the system to send a notification email after 4 weeks.
I have never seen an example for implementing such an email user interface. I don't know where to start. Do you know of any good tutorial or open source code that I can take as example?
Note: I appreciate anything useful but my preferred programming languages are python or java.
Use the SubEthaSMTP library to receive mail. That gives you the SMTP envelope information: reverse-path (usually the sender's email address), recipient and message content as a stream.
Based on your question it seems that you do not need to parse the message (for example to retrieve the subject), but if do need, then parse the mail using the JavaMail library.
You can find example code in the SubEthaSMTP wiki pages. A more complex example is SubEtha Mail, a mail list manager.