473,403 Members | 2,071 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,403 software developers and data experts.

POPing mail

I know that the IMAP library can be used to pop mail as well, but
the php.net documentation is not very clear (by this I mean
simple enough for me to understand).

Does anyone have a link or a resource that give simple examples ?

I need to retrieve some plain text or the plain text part of a
multipart email only.

bill
Jan 25 '07 #1
2 1166
bill wrote:
I know that the IMAP library can be used to pop mail as well, but the
php.net documentation is not very clear (by this I mean simple enough
for me to understand).

Does anyone have a link or a resource that give simple examples ?

I need to retrieve some plain text or the plain text part of a
multipart email only.

bill
Bill,

I don't know of any tutorials but in my messing around with the IMAP
functions it seemed pretty easy. The functions are pretty self
explanatory as found on www.php.net so really try to remember the folowing:

1) connect to the mail server
2) obtain the number of messages (if needed)
3) or optionally search for a specific message
4) fetch the info you want
5) close the connection

A simple example would be:

$mailbox =
imap_open("{your.mailserver.com:110/pop3}INBOX","username","password");
$mailbox_status = imap_check($mailbox);
echo "<br>Mailbox status for {$mailbox_status->Mailbox}:<br>";
echo "System date: {$mailbox_status->Date}<br>";
echo "System driver: {$mailbox_status->Driver}<br>";
echo "Message count: {$mailbox_status->Nmsgs}<br>";
etc.
imap_close($mailbox);
---
you may be better off looking through www.phpclasses.org and finding a
pre-made class that will do all this for you.

Norm
---
Jan 26 '07 #2
Norman Peelman wrote:
bill wrote:
>I know that the IMAP library can be used to pop mail as well, but the
php.net documentation is not very clear (by this I mean simple enough
for me to understand).

Does anyone have a link or a resource that give simple examples ?

I need to retrieve some plain text or the plain text part of a
multipart email only.

bill

Bill,

I don't know of any tutorials but in my messing around with the IMAP
functions it seemed pretty easy. The functions are pretty self
explanatory as found on www.php.net so really try to remember the folowing:

1) connect to the mail server
2) obtain the number of messages (if needed)
3) or optionally search for a specific message
4) fetch the info you want
5) close the connection

A simple example would be:

$mailbox =
imap_open("{your.mailserver.com:110/pop3}INBOX","username","password");
$mailbox_status = imap_check($mailbox);
echo "<br>Mailbox status for {$mailbox_status->Mailbox}:<br>";
echo "System date: {$mailbox_status->Date}<br>";
echo "System driver: {$mailbox_status->Driver}<br>";
echo "Message count: {$mailbox_status->Nmsgs}<br>";
etc.
imap_close($mailbox);
---
you may be better off looking through www.phpclasses.org and finding a
pre-made class that will do all this for you.

Norm
---
THanks Norm
Jan 26 '07 #3

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

Similar topics

0
by: Merijn Boom | last post by:
Hi there, I'm trying to create an html mail with embedded pictures in it. I run perl on Windows and Red Hat but I cannot get your module (Mail::Sender) to work. I'm just trying to run the...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
4
by: Satya | last post by:
I am trying to display a PDF file (which I am being passed from a web service as a binary stream) in a browser, but I am being prompted to save the file instead. I don't want the user to be...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
2
by: Gouse | last post by:
Hi, I have a small application which is running in service mode. Its responsible is to provide email configuratio. If it gets a request( eg: Export a file throug email) from the user, first it...
6
by: cover | last post by:
I'm using PHP 5 at home w/Apache & MySQL on a test system where I write through a form to a database and also send an email to people on a drop down list. Purpose for this is an electronic log at...
11
by: KRUNOPOPOVIC | last post by:
Hello, This code give me "deque empty before pop" error with visual c++ express in debug configuration mode. Why poping empty stack doesn't throw exception ? Uncommenting the line solves...
2
mikek12004
by: mikek12004 | last post by:
Before posting here I google it and saw ablut 30 pages for a solution so I pretty much excluded the obvious things. The code is <?php //now to send the mails to seller...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.