andyedinborough/aenetmail — Issue #2: Body not parsed from text/plain messages sent by Gmail
Author: Waldo2k2
Created: 2011-11-15 02:56:36+00:00
State: open

The library fails to parse the message body in text/plain messages send by Gmail. I've attached an example, I'm really not sure how to fix the parsing logic to account for this except maybe checking the headers for content-type: text/plain?
What's happening is that the one line of body text is being treated as if it's part of the headers.

Delivered-To: yyy@gmail.com
Received: by 10.142.174.3 with SMTP id w3cs50740wfe;
Mon, 14 Nov 2011 18:10:08 -0800 (PST)
Return-Path:
Received-SPF: pass (google.com: domain of zzz@gmail.com designates 10.227.208.71 as permitted sender) client-ip=10.227.208.71;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of zzz@gmail.com designates 10.227.208.71 as permitted sender) smtp.mail=zzz@gmail.com; dkim=pass header.i=zzz@gmail.com
Received: from mr.google.com ([10.227.208.71])
by 10.227.208.71 with SMTP id gb7mr16473303wbb.7.1321323006082 (num_hops = 1);
Mon, 14 Nov 2011 18:10:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:from:date:message-id:subject:to:content-type;
bh=3ajdGhBv88zJknw0EVGu6lJhm0zz+4eRVot/EGmYTOs=;
b=nxqtHAr0o4/76BCnJVbxXCL0NWiABD9o1ijDXpJaNIJ19+ParWNzEtbTf9xiFMtoDI
kufMoypwCxokbNJRXxmiuXnWSBvQ2UhNqwnIYvr2YxXpj+nOIEZOXmoj2S3DF0PM7Qif
MuSMSi3f4Jmcscmi6KNeP4wCcmqF564fccGhw=
Received: by 10.227.208.71 with SMTP id gb7mr16473303wbb.7.1321323006076; Mon,
14 Nov 2011 18:10:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.227.200.65 with HTTP; Mon, 14 Nov 2011 18:09:45 -0800 (PST)
From: Drew Peterson
Date: Mon, 14 Nov 2011 20:09:45 -0600
Message-ID:
Subject: test2
To: yyy@gmail.com
Content-Type: text/plain; charset=UTF-8

Test message body