I"m lost in a bunch of twisty passages all in the Email:: world :o). my problem is {I think} very simple but the Email modules seem much more focused on creating/modifying messages and I can't see how just to *examine* a message.
What I want to do a mock-email-reader. This means I need to parse out the headers {I just need things like from/to/subject/date} and then find the "body" of the message. There seem to be three types of incoming emails one is plain text, another in plain html {that is no multipart but just HTML.. I got one just today:
X-CMAE-Envelope: MS4xfLUIIc3gwFFCUTu1+RYnII5snX2pyaUrABakvIQ567LlL7RBF
+Ly4Wo65N93eCIInGj50aDn6TLwhXwJbk7HKUHu2pUzH8OWeKTJoF2xE/w3tkTQrR8cj
Kh4gBf/TMflzvBVgeRGN7++n/ZIwr/endxydKhxB1KRKrAoSBcA1O3+KsH4dy7QKym+yU
+9SP+8B9fQ==
X-PMFLAGS: 34095744 0 65537 PQVHWQ2O.CNM
X-CC-Diagnostic: Body contains "click here" (20)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/
+/www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:v=3D"u
+rn:sc=
hemas-microsoft-com:vml">=20
<head> <!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/
+><o:P=
ixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![e
+ndif]=
-->=20
and of course a multipart message {in which case I'd want the HTML part}.
This feels like it should be easy but so much of Email::* is occupied about modifying/adding/MIMEing, etc that I can't separate out the simple "parse and extract" machinery I need. Any advice/guidance/tutorial? THANKS