From: "Robert P. J. Day" on

i'm guessing this is going to be my problem and has nothing to do
with the Mail_mimeDecode package, but i was testing receiving incoming
messages that were redirected into my PHP script via /etc/valiases and
everything was working fine, particularly the ability to extract the
value of the "To:" field in the raw source and access it as
$decode_thingy->headers['to']. worked great.

however, the instant i started sending short messages with
attachments, the format of the email messages changed so that there
was no longer a "To:" line in the raw source, resulting (i'm guessing)
in the inability of the mimeDecode package to extract that value (not
at all surprising).

so where the heck did the recipient value go? apparently, based on
something that has clearly changed, it's now buried in the "Received:"
line, as in:

"Received: from [127.0.0.1] (port=39279 helo=localhost) by ... blah
blah ... for <destination email address>; Thu, 01 Apr 2010 ... etc
^^^^^^^^^^^^^^^^^^^^^^^^^

so the recipient's email address is still available, it's just
buried in the middle of that line. i'm curious (and, again, i admit,
this seems clearly not a mimeDecode issue) is there some email setting
that causes the above to happen? i assume that i'll just have to
check for an actual "to" field and, if it's not there, use a simple
regular expression to grab what i want out of the line above. but
does anyone know why the above would happen? and, even worse, can the
recipient email address not be in the "Received:" line either? i'm
wondering how many possibilities i need to consider now. thanks.

rday

p.s. i suspect it's beyond the scope of the mimeDecode package to
recognize the above and do that extra work for me. :-)

--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================