PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Accessing POP3 Mail in PHP
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Accessing POP3 Mail in PHP

Réponse
 
LinkBack Outils de la discussion
Vieux 19/09/2007, 03h00   #1
Harold Philips
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Accessing POP3 Mail in PHP

Hello Everyone,

Does anyone know of an easy way to access the body of an email in PHP? I
have a box with a bunch of one line email in it. All I need to retreive is
the senders email address and the body. Can anyone ?

Thanks,
Harold



--
Posted via a free Usenet account from http://www.teranews.com

  Réponse avec citation
Vieux 19/09/2007, 04h50   #2
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP


"Harold Philips" <haroldphilips@adcl.biz> wrote in message
news:46f06963$0$16321$88260bb3@free.teranews.com.. .
> Hello Everyone,
>
> Does anyone know of an easy way to access the body of an email in PHP? I
> have a box with a bunch of one line email in it. All I need to retreive is
> the senders email address and the body. Can anyone ?
>
> Thanks,
> Harold
>
>
> --
> Posted via a free Usenet account from http://www.teranews.com


if you look at the rfc for email, you'll find out what the tags are. parse
those for their respective values. the body is, by rfc, is seperated from
the header by two new line characters...and is the last portion of the
email. if you don't like reading the rfc, save an email as a text file. open
the text file in a text editor. look for the tags you expect to parse...then
create the code to do your parsing.

that is the 'easy' way...but far from an 'easy button'. ;^)


  Réponse avec citation
Vieux 19/09/2007, 04h58   #3
Harold Philips
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP


"Steve" <no.one@example.com> wrote in message
news:I70Ii.560$W76.373@newsfe12.lga...
>
> "Harold Philips" <haroldphilips@adcl.biz> wrote in message
> news:46f06963$0$16321$88260bb3@free.teranews.com.. .
>> Hello Everyone,
>>
>> Does anyone know of an easy way to access the body of an email in PHP? I
>> have a box with a bunch of one line email in it. All I need to retreive
>> is the senders email address and the body. Can anyone ?
>>
>> Thanks,
>> Harold
>>
>>
>> --
>> Posted via a free Usenet account from http://www.teranews.com

>
> if you look at the rfc for email, you'll find out what the tags are. parse
> those for their respective values. the body is, by rfc, is seperated from
> the header by two new line characters...and is the last portion of the
> email. if you don't like reading the rfc, save an email as a text file.
> open the text file in a text editor. look for the tags you expect to
> parse...then create the code to do your parsing.
>
> that is the 'easy' way...but far from an 'easy button'. ;^)


Thank you for the reply. Definately not the "easy" button but a lot closer
to it than I was.

Thanks!



--
Posted via a free Usenet account from http://www.teranews.com

  Réponse avec citation
Vieux 19/09/2007, 05h08   #4
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP


"Harold Philips" <haroldphilips@adcl.biz> wrote in message
news:46f08535$0$16274$88260bb3@free.teranews.com.. .
>
> "Steve" <no.one@example.com> wrote in message
> news:I70Ii.560$W76.373@newsfe12.lga...
>>
>> "Harold Philips" <haroldphilips@adcl.biz> wrote in message
>> news:46f06963$0$16321$88260bb3@free.teranews.com.. .
>>> Hello Everyone,
>>>
>>> Does anyone know of an easy way to access the body of an email in PHP?
>>> I have a box with a bunch of one line email in it. All I need to
>>> retreive is the senders email address and the body. Can anyone ?
>>>
>>> Thanks,
>>> Harold
>>>
>>>
>>> --
>>> Posted via a free Usenet account from http://www.teranews.com

>>
>> if you look at the rfc for email, you'll find out what the tags are.
>> parse those for their respective values. the body is, by rfc, is
>> seperated from the header by two new line characters...and is the last
>> portion of the email. if you don't like reading the rfc, save an email as
>> a text file. open the text file in a text editor. look for the tags you
>> expect to parse...then create the code to do your parsing.
>>
>> that is the 'easy' way...but far from an 'easy button'. ;^)

>
> Thank you for the reply. Definately not the "easy" button but a lot closer
> to it than I was.


are you comfortable with parsing?


  Réponse avec citation
Vieux 19/09/2007, 05h24   #5
Harold Philips
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP

>>>> Hello Everyone,
>>>>
>>>> Does anyone know of an easy way to access the body of an email in PHP?
>>>> I have a box with a bunch of one line email in it. All I need to
>>>> retreive is the senders email address and the body. Can anyone ?
>>>>
>>>> Thanks,
>>>> Harold


>>> if you look at the rfc for email, you'll find out what the tags are.
>>> parse those for their respective values. the body is, by rfc, is
>>> seperated from the header by two new line characters...and is the last
>>> portion of the email. if you don't like reading the rfc, save an email
>>> as a text file. open the text file in a text editor. look for the tags
>>> you expect to parse...then create the code to do your parsing.
>>>
>>> that is the 'easy' way...but far from an 'easy button'. ;^)

>>
>> Thank you for the reply. Definately not the "easy" button but a lot
>> closer to it than I was.

>
> are you comfortable with parsing?


No, I'm not. I am almost terrified of regular expressions. lol
It sucks to because all I need is to get the body of the email and the
sender.
Why do you as?

Harold



--
Posted via a free Usenet account from http://www.teranews.com

  Réponse avec citation
Vieux 19/09/2007, 08h11   #6
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP


"Harold Philips" <haroldphilips@adcl.biz> wrote in message
news:46f08b22$0$21137$88260bb3@free.teranews.com.. .
>>>>> Hello Everyone,
>>>>>
>>>>> Does anyone know of an easy way to access the body of an email in PHP?
>>>>> I have a box with a bunch of one line email in it. All I need to
>>>>> retreive is the senders email address and the body. Can anyone ?
>>>>>
>>>>> Thanks,
>>>>> Harold

>
>>>> if you look at the rfc for email, you'll find out what the tags are.
>>>> parse those for their respective values. the body is, by rfc, is
>>>> seperated from the header by two new line characters...and is the last
>>>> portion of the email. if you don't like reading the rfc, save an email
>>>> as a text file. open the text file in a text editor. look for the tags
>>>> you expect to parse...then create the code to do your parsing.
>>>>
>>>> that is the 'easy' way...but far from an 'easy button'. ;^)
>>>
>>> Thank you for the reply. Definately not the "easy" button but a lot
>>> closer to it than I was.

>>
>> are you comfortable with parsing?

>
> No, I'm not. I am almost terrified of regular expressions. lol
> It sucks to because all I need is to get the body of the email and the
> sender.
> Why do you as?


because i can . you don't need regex to do it. if you just want the
body, find the first occurance of \r\n\r\n. where that occurs, use substr
and you have it...that doesn't take into account that the message itself may
be part of a multi-mimed format - one that gives both a text version and the
other, html.

does that get you going?


  Réponse avec citation
Vieux 19/09/2007, 10h13   #7
gosha bine
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP

On 19.09.2007 03:00 Harold Philips wrote:
> Hello Everyone,
>
> Does anyone know of an easy way to access the body of an email in PHP? I
> have a box with a bunch of one line email in it. All I need to retreive is
> the senders email address and the body. Can anyone ?
>
> Thanks,
> Harold
>
>
>


Hi

take a look at

http://pear.php.net/package/Mail_mimeDecode


--
gosha bine

makrell ~ http://www.tagarga.com/blok/makrell
php done right http://code.google.com/p/pihipi
  Réponse avec citation
Vieux 19/09/2007, 20h50   #8
Chuck Anderson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP

Harold Philips wrote:
> Hello Everyone,
>
> Does anyone know of an easy way to access the body of an email in PHP? I
> have a box with a bunch of one line email in it. All I need to retreive is
> the senders email address and the body. Can anyone ?
>
> Thanks,
> Harold
>


I use this Pop3 Class from Manuel Lemos:
http://www.phpclasses.org/browse/package/2.html

The examples were pretty easy to follow - and then modify to my needs..

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
The world is my country,
Science, my religion.
*****************************
  Réponse avec citation
Vieux 22/09/2007, 22h07   #9
Manuel Lemos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Accessing POP3 Mail in PHP

Hello,

on 09/18/2007 10:00 PM Harold Philips said the following:
> Does anyone know of an easy way to access the body of an email in PHP? I
> have a box with a bunch of one line email in it. All I need to retreive is
> the senders email address and the body. Can anyone ?


If you need to access complex e-mail messages with text, HTML, images,
attachments, etc., you may want to try to use this MIME message parser
class:

http://www.phpclasses.org/mimeparser

Actually, you can hook it with this POP3 class and handle large messages
without needing much memory:

http://www.phpclasses.org/pop3class


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h42.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17711 seconds with 17 queries