473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Thanks,
Harold

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

Sep 19 '07 #1
8 1993

"Harold Philips" <ha***********@adcl.bizwrote in message
news:46***********************@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 help?

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'. ;^)
Sep 19 '07 #2

"Steve" <no****@example.comwrote in message
news:I7***************@newsfe12.lga...
>
"Harold Philips" <ha***********@adcl.bizwrote in message
news:46***********************@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 help?

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

Sep 19 '07 #3

"Harold Philips" <ha***********@adcl.bizwrote in message
news:46***********************@free.teranews.com.. .
>
"Steve" <no****@example.comwrote in message
news:I7***************@newsfe12.lga...
>>
"Harold Philips" <ha***********@adcl.bizwrote in message
news:46***********************@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 help?

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?
Sep 19 '07 #4
>>>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 help?

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

Sep 19 '07 #5

"Harold Philips" <ha***********@adcl.bizwrote in message
news:46***********************@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 help?
>
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 help. 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?
Sep 19 '07 #6
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 help?

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
Sep 19 '07 #7
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 help?

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.
*****************************
Sep 19 '07 #8
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 help?
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/
Sep 22 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alexander Franksmann | last post by:
Hello, I'm going to write a anti-spam-program based on a Whitelist. "If the mail sender is found in the database, my program should move the mail into another mailbox" The mailserver fetched the...
4
by: WebRod | last post by:
Hi everybody, I just would like to download the new mails I received on my POP3 server (and keep a copy on the server) I use PHP 4.3 and IMAP functions (they are compatible with both POP3 and...
0
by: Eric McDaniel | last post by:
This may be a question for ActiveState support, but just in case anyone out there knows what the problem is... My call to Net::POP3->new() works fine when run through the perl interpreter, but...
2
by: TomT | last post by:
Hi Is it possible to create a page that will check a POP3 mail box, download any emails (leaving the old mail on the server) then entering that infomation in to a database.. All this based...
4
by: Ron Vecchi | last post by:
I a runnning w2k3 pop3 mail server that came with iis6. I would like to write an application that progammtically creates the new mailboxes in an already established mail domain. Does anyone know...
5
by: Ken Nistler | last post by:
Hello, I was wondering if anyone can help me out. I am trying to send mail from a c# app thru my ISP pop3 mail server. I figured it would be similar to using SMTP, but use my username and...
2
by: Mike Brearley | last post by:
I need to write a script that will check a catch-all mailbox (pop3) and send a non delivery report back to the sender of the email. Background info: I have a domain hosted on a site that offers...
1
by: bobano | last post by:
Hi everyone, I am writing a POP3 Client program in Perl. You connect to a POP3 Server and have a running conversation with the mail server using commands from the RFC 1939 Post Office Protocol....
4
by: Pavils Jurjans | last post by:
Hello list, In order to do some mail processing before it ever gets to the mail client, we plan to implement a POP3 proxy solution. Ie, POP3 mail client would connect to the proxy instead of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.