See METHODS in Mail::Reporter
The $arg is an array with header lines.
Option | Defined in | Default |
---|---|---|
FoldLength | 79 | |
MailFrom |
| |
Modify | <false> | |
field_type | Mail::Message::Head | |
log | Mail::Reporter |
|
message | Mail::Message::Head | undef |
modified | Mail::Message::Head | <false> |
trace | Mail::Reporter |
|
Add a header line, which simply calls Mail::Message::Head::add()
on
the header for the specified $line. The $index is ignored, the unfolded
body of the field is returned.
Delete the fields with the specified $tag. The deleted fields are returned. If no index is given, then all are removed.
Get all the header fields with the specified $name. In scalar context, only the first fitting $name is returned. Even when only one $name is specified, multiple lines may be returned in list context: some fields appear more than once in a header.
Replace the field named $tag. from place $index (by default the first) by
the $line. When $tag is undef
, it will be extracted from the $line first.
This calls Mail::Message::Head::Complete::reset() on the message's head.
Returns the whole header as one big scalar. Calls Mail::Message::Head::Complete::string().
Cleanup memory usage. Not needed here.
I do not see any valid reason for this command, so did not implement it.
Clean-out the whole hash. Better not use this (simply create another header object), although it should work.
Returns whether there are any fields.
Extract (and remove) header fields from the array.
Refold all fields in the header, to $length or whatever fold_length() returns.
Returns the line wrap, optionally after setting it to $length. The old value is returned. The $tag argument is ignored, because it is silly to have different lines fold in different ways. This method cannot be called statically anymore.
Extract the fields from the ARRAY, if specified, and then fold the fields. Returned is an array with all fields, produced via orderedFields().
If you are using this method, you must be stupid... anyway: I do not want to support it for now: use add() and friends.
What to do when a header line in the form `From ' is encountered. Valid
values are IGNORE
- ignore and discard the header, ERROR
- invoke
an error (call die), COERCE
- rename them as Mail-From and KEEP
- keep them.
Refold the headers when they are added.
Read the header from the $file.
Returns all the names of fields, implemented by Mail::Message::Head::Complete::names().
Remove the folding for all instances of $tag, or all fields at once.