Jump to content

Recommended Posts

Posted

In messing around with the php imap functions I found that the imap_header and imap_headerinfo functions cause the whole page not to load as soon as they were called. I am able to successfully get the body of a message but not the header. I also found the same behavior when I tried to use pofHQ-wapMAIL program. Does anyone have any suggestions?

 

Thanks

Posted

I never used the IMAP stuff in PHP so I'm not sure what it could be but I suggest you run the script on your computer and use a sniffer to capture analyze the IMAP traffic between your computer and the server.

Posted

Welcome to the forums, jpepper! :thumbup1:

 

I don't really know anything about PHP's IMAP functions, but I did find the following in the PHP documentation (and comments):

 

1) imap_header() is an alias of imap_headerinfo() - they are the same function.

 

2) One comment noted that some IMAP servers don't support imap_headerinfo(), and recommended using imap_fetch_overview instead.

 

3) One comment noted that calling imap_headerinfo() after calling imap_body() didn't work for them - they had to change their script to call imap_headerinfo() before imap_body().

 

Beyond that, I think you'd need to post what code you're using and what error you're seeing (if any), and maybe someone here can figure out why it does not work.

Posted

Thanks all. Good to be here.

 

I found that imap_fetch_overview had the same problem as imap_header_info. It crashed the page. I did however find that imap_fetchheader was able to get the raw header. I then hacked together a my_imap_header to fetch the header and parse it. That seems to work, but you loose all the Unseen and Recent information about the email. I will try all this from a different box to see if it is the imap servers issue or something about the php compilation we are using.

 

Thanks again

jpepper

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...