7.3.2.3 MHMessage

class MHMessage( [message])
A message with MH-specific behaviors. Parameter message has the same meaning as with the Message constructor.

MH messages do not support marks or flags in the traditional sense, but they do support sequences, which are logical groupings of arbitrary messages. Some mail reading programs (although not the standard mh and nmh) use sequences in much the same way flags are used with other formats, as follows:

Sequence Explanation
unseen Not read, but previously detected by MUA
replied Replied to
flagged Marked as important

MHMessage instances offer the following methods:

get_sequences( )
Return a list of the names of sequences that include this message.

set_sequences( sequences)
Set the list of sequences that include this message.

add_sequence( sequence)
Add sequence to the list of sequences that include this message.

remove_sequence( sequence)
Remove sequence from the list of sequences that include this message.

When an MHMessage instance is created based upon a MaildirMessage instance, the following conversions take place:

Resulting state MaildirMessage state
"unseen" sequence no S flag
"replied" sequence R flag
"flagged" sequence F flag

When an MHMessage instance is created based upon an mboxMessage or MMDFMessage instance, the Status: and X-Status: headers are omitted and the following conversions take place:

Resulting state mboxMessage or MMDFMessage state
"unseen" sequence no R flag
"replied" sequence A flag
"flagged" sequence F flag

When an MHMessage instance is created based upon a BabylMessage instance, the following conversions take place:

Resulting state BabylMessage state
"unseen" sequence "unseen" label
"replied" sequence "answered" label

See About this document... for information on suggesting changes.