It is currently Thu Mar 28, 2024 11:28 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Inbound Email
PostPosted: Sat Nov 19, 2005 8:40 pm 
Noobie
Noobie

Joined: Mon Oct 31, 2005 9:14 pm
Posts: 44
I cannot use mail() with my current "NO banners account", I need to have at least a "Personal Package" plan. I will be upgrading my account shortly. When I do...

Will I be able to access incoming email's through the filesystem?

As it stands now I can read the following directory which is my email box

/home/mail/james@thedatamine.biz/

but what appears to be my inbound email I can't get at because I believe it is some sort of symbolic link owned by root. It looks like this

-rw------- 1 92635 root 982 Nov 19 21:13 1132427630.H931248P32630.coolinc.info:2

Will I be able to access this file to read my emails through php after I upgrade my account? Am I just looking in the wrong place? There are no PHP functions which deal with inbound emails as far as I can tell.

Can anybody help me with this one? Sorry for all of the questions?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 9:09 pm 
Noobie
Noobie

Joined: Mon Oct 31, 2005 9:14 pm
Posts: 44
Whoops! I guess I panicked and asked the question too soon...

Here's the answer...


You were looking in the wrong place jupiter777. PHP supports the imap suite of functions that will enable you to access your POP3 account.

Try using this piece of code...

$password = 'not telling';

$mbox = imap_open("{localhost:110/pop3}INBOX", "james@thedatamine.biz", $password)
or die("can't connect: " . imap_last_error());

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{localhost:110/pop3}INBOX", "*");

if ($folders == false) {
echo "Call failed<br />\n";
} else {
foreach ($folders as $val) {
echo $val . "<br />\n";
}
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
echo "Call failed<br />\n";
} else {
foreach ($headers as $val) {
echo $val . "<br />\n";
}
}

imap_close($mbox);


better yet... go check out php.net for the answers your looking for...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 9:09 pm 
Noobie
Noobie

Joined: Mon Oct 31, 2005 9:14 pm
Posts: 44
Gee... Thanks... you've saved me hours of headaches...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011