See METHODS in Mail::Reporter
When the $data is specified as single line, the content part is considered to be correcly (character) encoded and escaped. Typically, it is a line as read from file. The folding of the line is kept as is.
In case more than one argument is provided, the second is considered the BODY. Attributes and other special things are not defined for unstructured fields, and therefore not valid options. The BODY can be a single string, a single OBJECT, or an array of OBJECTS. The objects are stringified (into a comma separated list). Each BODY element is interpreted with the specified encoding.
When the BODY is empty, the construction of the object fails: undef
is
returned.
Option | Defined in | Default |
---|---|---|
charset | Mail::Message::Field::Full | undef |
encoding | Mail::Message::Field::Full |
|
force | Mail::Message::Field::Full | false |
language | Mail::Message::Field::Full | undef |
log | Mail::Reporter |
|
trace | Mail::Reporter |
|
my $s = Mail::Message::Field::Unstructured->new('Comment', 'Hi!'); # Use autodetect my $s = Mail::Message::Field::Full->new('Comment', 'Hi!'); my $s = Mail::Message::Field::Full->new('Comment: Hi!');