anaylyze email

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-13-2008
Yui Hiroaki
 
Posts: n/a
Default anaylyze email

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

Reply With Quote
  #2 (permalink)  
Old 01-13-2008
Manuel Lemos
 
Posts: n/a
Default Re: anaylyze email

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/
Reply With Quote
  #3 (permalink)  
Old 01-13-2008
thibī
 
Posts: n/a
Default Re: anaylyze email

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ī
Reply With Quote
  #4 (permalink)  
Old 01-14-2008
Aerik
 
Posts: n/a
Default Re: anaylyze email

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
Reply With Quote
  #5 (permalink)  
Old 01-14-2008
clive
 
Posts: n/a
Default Re: [PHP] anaylyze email

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
>
>

Reply With Quote
  #6 (permalink)  
Old 01-14-2008
Richard Lynch
 
Posts: n/a
Default Re: anaylyze email

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?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:59 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0