This is a discussion on anaylyze email within the PHP General forums, part of the PHP Programming Forums category; Thank you for your response. I try to write a code. I actualy want to do; 1) some body send ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Thank you for your response.
I try to write a code. I actualy want to do; 1) some body send email to me; for example; to info@abc.com from xxx@xyz.com 2)read it's email 3)return to xxx@xyz.com so I can not do this 2) I try to read pop3. I can not find any example! Regards, Yui |
|
|||
|
Hello,
on 01/13/2008 07:46 PM Yui Hiroaki said the following: > Thank you for your response. > > I try to write a code. > > I actualy want to do; > > 1) some body send email to me; for example; to info@abc.com from xxx@xyz.com > 2)read it's email > 3)return to xxx@xyz.com > > so I can not do this 2) > > I try to read pop3. I can not find any example! You can use the MIME parser package. It can be used to parse whole messages including extracting e-mail addresses from the headers. But if you have already the From address header value, you can use the RFC822 address parser class which can extract the e-mail addresses and any names associated to the names. It also has some tolerance to malformed addresses, so it can parse addresses in messages that are not correctly formatted according to the e-mail standards. Take a look in particular at the test_message_decoder.php and test_parse_addresses.php example scripts. http://www.phpclasses.org/mimeparser -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ |
|
|||
|
Manuel Lemos wrote:
> Hello, > > on 01/13/2008 07:46 PM Yui Hiroaki said the following: >> Thank you for your response. >> >> I try to write a code. >> >> I actualy want to do; >> >> 1) some body send email to me; for example; to info@abc.com from xxx@xyz.com >> 2)read it's email >> 3)return to xxx@xyz.com >> >> so I can not do this 2) >> >> I try to read pop3. I can not find any example! > > You can use the MIME parser package. It can be used to parse whole > messages including extracting e-mail addresses from the headers. > > But if you have already the From address header value, you can use the > RFC822 address parser class which can extract the e-mail addresses and > any names associated to the names. > > It also has some tolerance to malformed addresses, so it can parse > addresses in messages that are not correctly formatted according to the > e-mail standards. > > Take a look in particular at the test_message_decoder.php and > test_parse_addresses.php example scripts. > > http://www.phpclasses.org/mimeparser > > I didn't know about the MIME parser package, but in case it doesn't retrieve messages from pop3 servers, there's a few more interesting classes that might help: http://www.google.com/search?hl=en&q...phpclasses.org Good luck ;) -thibī |
|
|||
|
On Jan 13, 1:46*pm, hiroaki...@gmail.com ("Yui Hiroaki") wrote:
> Thank you for your response. > > I try to write a code. > > I actualy want to do; > > 1) some body send email to me; for example; to i...@abc.com from x...@xyz.com > 2)read it's email > 3)return to x...@xyz.com > > so I can not do this 2) > > I try to read pop3. I can not find any example! > > Regards, > Yui You could use my code http://www.aerik.com/code/ Good luck, Aerik |
|
|||
|
Depending on your mail server, you could possibly get your mail server
to run a php script on an incoming email. Clive Yui Hiroaki wrote: > Thank you for your response. > > I try to write a code. > > I actualy want to do; > > 1) some body send email to me; for example; to info@abc.com from xxx@xyz.com > 2)read it's email > 3)return to xxx@xyz.com > > so I can not do this 2) > > I try to read pop3. I can not find any example! > > Regards, > Yui > > |
|
|||
|
On Sun, January 13, 2008 3:46 pm, Yui Hiroaki wrote:
> Thank you for your response. > > I try to write a code. > > I actualy want to do; > > 1) some body send email to me; for example; to info@abc.com from > xxx@xyz.com > 2)read it's email > 3)return to xxx@xyz.com > > so I can not do this 2) > > I try to read pop3. I can not find any example! PHP's IMAP extension can open/read POP3 email boxes just fine. http://php.net/imap Though you are better off using IMAP in your mailboxes in the first place, usually. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|