I've hit a bit of a snag here but I know the headers are there somewhere as I can view the original headers from forwarded e-mail through the Gmail service. Can these be viewed with PHPs IMAP functions or is it time to bring in the classes?
Regards,
Parsing original headers from a forwarded e-mail.
Moderator: General Moderators
imap_headerinfo() - http://us.php.net/manual/en/function.im ... erinfo.php
imap_fetchheader() - http://us.php.net/manual/en/function.im ... header.php
Both return header information, it just depends on which format you need the returned values in. The first returns it as a nice object with properties set to their respective values (ie: $obj->fromaddress). The second returns the "unfiltered RFC2822 format header of the specified message".
imap_fetchheader() - http://us.php.net/manual/en/function.im ... header.php
Both return header information, it just depends on which format you need the returned values in. The first returns it as a nice object with properties set to their respective values (ie: $obj->fromaddress). The second returns the "unfiltered RFC2822 format header of the specified message".
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
These do contain the headers of the e-mail that's in the mailbox, but it doesn't contain the headers from the original e-mail that was sent to the forwarder, if it was forwarded.
It looks like they're stored in the body section from a second glance. I'm having trouble picking out a certain part now though. Happy days
It looks like they're stored in the body section from a second glance. I'm having trouble picking out a certain part now though. Happy days
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
I'm still a bit stuck with this at the moment but I may be able to help you help me.
If I highlight multiple e-mails in Microsoft Outlook and then forward them to an address, each selected e-mail gets sent as an attachment. If I view the mail box these were sent to in a webmail service I have the option to 'Display' each attachment, but when I click it I get the option to save the attachments as .EML files (which would suit me fine). But if I view the bodystructure of the e-mail containing the e-mails as attachments, PHP doesn't see those files as .EML files, it sees them all as the same file:
Regards,
If I highlight multiple e-mails in Microsoft Outlook and then forward them to an address, each selected e-mail gets sent as an attachment. If I view the mail box these were sent to in a webmail service I have the option to 'Display' each attachment, but when I click it I get the option to save the attachments as .EML files (which would suit me fine). But if I view the bodystructure of the e-mail containing the e-mails as attachments, PHP doesn't see those files as .EML files, it sees them all as the same file:
Does anybody know a way to use the IMAP functions in PHP to save those files as .EML files?[parameters] => Array
(
[0] => stdClass Object
(
[attribute] => CHARSET
[value] => us-ascii
Regards,