I've in the early stages of making my webmail sysytem. I'm looking at now displaying the email content.
From what I've read i need to first find out what structure the email is sent in. IE: HTML ect ect.
How can I do this??
Find the content-type header. If it's text/plain it's regular plain-text. If it's text/html it's HTML formatted email message.
~Brett
yeahb that's what i'm asking, how do i find this out??
Take a look at the IMAP functions.
yeah been reading there also google but can still not work it out that's why i'm posting something on here...
I'm gussing you use this
http://uk.php.net/manual/en/function.imap-bodystruct.php
but how do i write some code?
Perhaps you should look at the usernote for this: imap_fetchheader()
still have no idea how to start this code. I've connect to my IMAP server, found a email click the msgno now how do i find out what format its in?
So you can do all that, but you can't figure out how to write this code?
$msg = $_GET['msgno']; $headers = imap_fetchheader($imap_stream, $msg);
?
How does that tell me when format the email is in?
What I'm trying to do is display my emails. I understand i have to display HTML plain text ect in different ways...
is this correct?
You actually want imap_fetchstructure() which will tell you what type the email is, as well as lots of other useful info. Be sure to read through the user contributed notes as you'll probably find that what you want to do is already there.