• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

fetching subject line from POP-mail using PHP

#1
This is part of the code I use to check my mail:
Code:
for ($X=1;$X<=$num_messages;$X++){

 $header = imap_headerinfo($mbox,$X);
 $subject = $header->fetchsubject;
 $message = imap_body($mbox,$X);
 
print "Message number $X:<BR>
 Subject: <B>$subject</B><BR>";
 $message = htmlspecialchars($message);
 print str_replace("\n", "<br>", $message)."<BR>************************************<BR>";
}
I've got one problem: PHP doesn't fetch the subject line for some reason. The problem must be in $subject = $header->fetchsubject, but all of the examples on PHP.net I've seen, use this piece of code. I tried $header->subject, $header['fetchsubject'], but nothing there. I know that there is a subject line in the message(s), because there is one in the test message I sent. Please help me.
 
#7
nah 5 is still pretty much beta, if I didnt use allhope for beta testing code and so on I would give it a try but I dont wanna
 

Members online

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown