11-14-2013 10:50 AM - edited 11-14-2013 10:52 AM
I'm using the Message class to get a email message and I want to read the message header. I do not see any function to get the message header in the Message class. A typical header looks like this
Received: (qmail 9904 invoked by uid 4121); 14 Nov 2013 15:32:41 -0000 Delivered-To: email@example.com Message-ID: <F0D8FA6E.2DA0AC34@yahoo.com>
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
Received: (qmail 9901 invoked from network); 14 Nov 2013 15:32:41 -0000
Solved! Go to Solution.
11-15-2013 08:44 PM
All of the important header properties, such as the ones you pasted into your post, are exposed as properties of the Message class documented here:
For example, X-Priority's value is returned via the priority() mthod in the Message class.
Read the online reference and try printing some of those properties via debug statements and determine if you can retrieve everything you need. If something is missing. feel free to reply back to inquire further or file a feature request in the Developer Issue Tracker so that we can forward it to product management for review.
11-16-2013 11:14 AM
thanks. I have read that before I posted the message.
There are other headers that i'm interested in that the Message class can not get like X-Mailer .
Would be nice is Message class returns the entire message header block.
11-16-2013 10:24 PM
I will log a feature request for a method to retrieve the message Headers as a QMap for product management to review. It may take a while before it becomes available so you may need to work around the missing information for now.