[BNM] extracting email addresses from an IMAP server
Karim Ahmed
bnm at karimahmed.com
Fri May 30 12:49:09 BST 2008
Try this:
<?php
$mbox = imap_open("{<hostname>:<port_number>} INBOX", "<username>",
"<password>");
$headers = imap_headers($mbox);
foreach ($headers as $header) {
echo $header->From . "<br />\n";
}
?>
On Fri, May 30, 2008 at 12:35 PM, Chris Billett <chris at chrisbillett.net>
wrote:
> Sounsd like a lot of work. Couldn't you just grep a log?
>
> > Write a PHP script that connects to your IMAP server (have a look at the
> > docs at php.net to find the appropriate library) and iterates through
> the
> > inbox messages reading the addresses.
> >
> > On Fri, May 30, 2008 at 12:23 PM, andrew holway <andrew at moonet.co.uk>
> > wrote:
> >
> >> hi yall,
> >>
> >> I want to extract all the email addresses from all the emails in my
> >> inbox.
> >>
> >> How?
> >>
> >> Ta
> >>
> >> Andy
> >> --
> >>
> >> BNM Subscribe/Unsubscribe:
> >> http://www.brightonnewmedia.org/options/bnmlist
> >>
> >> Archive Search - http://icanhaz.com/bnmarchive
> >>
> >> BNM powered by Wessex Networks:
> >> http://www.wessexnetworks.com
> >>
> >
> >
> >
> > --
> > Karim Ahmed
> > Phone (UK): +44 7967 705998
> > Phone (when not in UK): +44 7509 224821
> > Skype: karim.ahmed
> > PGP public key: pub:46200601:17 (to send me encrypted emails etc)
> > --
> >
> > BNM Subscribe/Unsubscribe:
> > http://www.brightonnewmedia.org/options/bnmlist
> >
> > Archive Search - http://icanhaz.com/bnmarchive
> >
> > BNM powered by Wessex Networks:
> > http://www.wessexnetworks.com
> >
>
>
> --
>
> BNM Subscribe/Unsubscribe:
> http://www.brightonnewmedia.org/options/bnmlist
>
> Archive Search - http://icanhaz.com/bnmarchive
>
> BNM powered by Wessex Networks:
> http://www.wessexnetworks.com
>
--
Karim Ahmed
Phone (UK): +44 7967 705998
Phone (when not in UK): +44 7509 224821
Skype: karim.ahmed
PGP public key: pub:46200601:17 (to send me encrypted emails etc)
More information about the BNMlist
mailing list. Powered by Wessex Networks