Mailing List Archive

svn commit: r497792 - /spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Author: jm
Date: Fri Jan 19 04:41:35 2007
New Revision: 497792

URL: http://svn.apache.org/viewvc?view=rev&rev=497792
Log:
public APIs for accessing the decoded or rendered body arrays are undocumented; fix this. TODO: should we keep those PerMsgStatus APIs private, and document the ones on Message.pm instead?

Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?view=diff&rev=497792&r1=497791&r2=497792
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Fri Jan 19 04:41:35 2007
@@ -1368,9 +1368,34 @@

###########################################################################

+=item $status->get_decoded_body_text_array ()
+
+Returns the message body, with B<base64> or B<quoted-printable> encodings
+decoded, and non-text parts or non-inline attachments stripped.
+
+It is returned as an array of strings, with each string representing
+one newline-separated line of the body.
+
+=cut
+
sub get_decoded_body_text_array {
return $_[0]->{msg}->get_decoded_body_text_array();
}
+
+=item $status->get_decoded_stripped_body_text_array ()
+
+Returns the message body, decoded (as described in
+get_decoded_body_text_array()), with HTML rendered, and with whitespace
+normalized.
+
+It will always render text/html, and will use a heuristic to determine if other
+text/* parts should be considered text/html.
+
+It is returned as an array of strings, with each string representing one
+'paragraph'. Paragraphs, in plain-text mails, are double-newline-separated
+blocks of multi-line text.
+
+=cut

sub get_decoded_stripped_body_text_array {
return $_[0]->{msg}->get_rendered_body_text_array();