1
votes

I'm trying to get message headers from Courier IMAP I'm running the command

FETCH 3 BODY[HEADER]

where 3 is the message id, but all I get is the response

Error in IMAP command received by server.

I've also tried the following

FETCH 3 (BODY[HEADER])

But that doesn't work either, same error

This has been working fine in hMailServer, but not in Courier IMAP

What's wrong with this command?

EDIT:

The problem was I wasn't selecting a mailbox correctly. the fetch command itself is fine. thanks to max :)

1
Have you selected a folder? I get that exact error if I do that with no folder selected. I also assume you've provided a tag, and are just not showing us that. - Max
yes, you were right! it was a mailbox selection issue. i was trying to select a mailbox but long story short, i wasn't doing it correctly in my code and the mailbox wasn't being selected. thank you! - Peter Cullen
I will add an answer. - Max

1 Answers

1
votes

Have you selected a folder? I get that exact error if I do that with no folder selected.