[Tutor] imaplib append() question
Magnus Lycka
magnus@thinkware.se
Sun, 15 Sep 2002 17:28:24 +0200
At 11:50 2002-09-15 +0000, Kyle Babich wrote:
>I'm trying to use imaplib's append() to upload messages locally to an
>IMAP server. The files are .eml's and .txt's. The guy who runs the
>server told me that it seperates the header from the body with two
>newlines, but no matter how I go about this I still get the same
>response from the server: ('NO', ['Message has no header/body
>separator']). I think my problem is that I am representing the two
>newlines incorrectly and that is where I need help. I've tried opening
>the files in notepad and hitting the enter twice where the header of
>the mails meets the body and I've tried using \n\n but I still get the
>same message. What am I doing wrong?
\r\n\r\n perhaps?
From RFC 1730:
"All interactions transmitted by client and server are in the form of
lines; that is, strings that end with a CRLF."
See:
http://www.ietf.org/rfc/rfc1730.txt IMAP 4
http://www.ietf.org/rfc/rfc2822.txt Internet Message Format
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se