0
votes

I have a web application, written in PHP, where we have a couple of files that regularly needs to be sent to multiple recipients. The client wishes to have the mail conversation in their mailbox, so the web app should not send the e-mails itself. Is it possible, and if so how, to do the following:

  1. Create an e-mail with multiple recipients
  2. Add text to the subject and body of the e-mail
  3. Download and attach a zip file which is available on the server

The mail client in question is Outlook - I'm unsure of the exact version.

I'm open to suggestions on which technology to use for this - the client mentioned Visual Basic but I'm unsure of how I could use that on the client side of the web app - or if it's even appropriate.

2

2 Answers

3
votes

Assuming that the client want's to send that by hand, you can do all that by using the mailto: in an tag and "&attachment=". The only problem is that attached files need to be localy accessable. If they are not, they are not attached. Exact syntax specifications can be found here: mailto: Syntax

If you have imap access to the customers mail server you could use php imap mail and php imap mail compose to create a email which will just show up in your customers sent email folder.

Also I there is a MIME Message class, where the author claims that it can create and save an email as an .eml file. MIME Class

0
votes

This is theoretically possible, but only with IE on the client side, and with other limitations and tribulations.

How about a different approach: Have the web server send out the E-Mail, and send a copy into the client's mailbox. Mark the copy with a special header or something, and add a rule in the client's Outlook to sort mails with that header into a specific folder.