Re: [PHP] Save email as .eml file

2007-07-20 Thread bkozora
Thanks for your help. How would I go about getting procmail to forward it? What I currently have is a script that connects to a free email address that collects bounces captured from newsletters the system has sent. I'm using IMAP to connect to the mailbox, then looping through and trying to

Re: [PHP] Save email as .eml file

2007-07-20 Thread bkozora
I think I found a solution. Must admit I feel pretty down for spending so much time on this when the solution was so simple, but I couldn't find too much info on PHP's imap functions. Hopefully this will be indexed and help developers in the future. PHP has a function that saves the message in a

Re: [PHP] Save email as .eml file

2007-07-20 Thread Richard Lynch
On Wed, July 18, 2007 8:56 am, Rosen wrote: Is there a way to create e-mail with PHP and save it to .eml file (without sending)? I dunno if MS adds anything funky to a .eml file, but I suspect that it's just the raw headers and then the body... So pretty much file_put_contents would do it, if

Re: [PHP] Save email as .eml file

2007-07-20 Thread Richard Lynch
On Thu, July 19, 2007 9:18 pm, bkozora wrote: I've been struggling with the same issue, does anyone have a link to or know of a way to automatically create eml files using PHP? The links that Google search returned were mostly specific to email clients, I need to create the eml files on the

Re: [PHP] Save email as .eml file

2007-07-20 Thread Richard Lynch
What exactly is the end goal after you have the message in an .eml file? If you just fetch the WHOLE damn thing with IMAP and dump it into a file and name it whatever.eml then you're done, by the way. So imap_fetchheader, find out how many body parts there are, imap_fetchbody for each one, dump

Re: [PHP] Save email as .eml file

2007-07-20 Thread bkozora
Yeah, that and imap_savebody($imap, $fn, $i); work. Thanks Richard Lynch wrote: On Wed, July 18, 2007 8:56 am, Rosen wrote: Is there a way to create e-mail with PHP and save it to .eml file (without sending)? I dunno if MS adds anything funky to a .eml file, but I suspect that it's just

Re: [PHP] Save email as .eml file

2007-07-19 Thread bkozora
I've been struggling with the same issue, does anyone have a link to or know of a way to automatically create eml files using PHP? The links that Google search returned were mostly specific to email clients, I need to create the eml files on the server. Thanks -- View this message in context:

Re: [PHP] Save email as .eml file

2007-07-19 Thread Handa Utsav
Hi there, Well it can be easily done. Just input your mail (make 'procmail' fwd it) to your script script would save it as .eml . Try to use the following code for script : CODE # ?php $email = ; ## Read E-mail

[PHP] Save email as .eml file

2007-07-18 Thread Rosen
Hi, Is there a way to create e-mail with PHP and save it to .eml file (without sending)? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Save email as .eml file

2007-07-18 Thread Jay Blanchard
[snip] Is there a way to create e-mail with PHP and save it to .eml file (without sending)? [/snip] Yes, there is a way. http://www.google.com/search?hl=enq=save+as+.eml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php