{
    "mode": "perldoc",
    "parameter": "Mail::Message::Field",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AMessage%3A%3AField/json",
    "generated": "2026-06-11T03:40:16Z",
    "synopsis": "my $field = Mail::Message::Field->new(From => 'fish@tux.aq');\nprint $field->name;\nprint $field->body;\nprint $field->comment;\nprint $field->content;  # body & comment\n$field->print(\\*OUT);\nprint $field->string;\nprint \"$field\\n\";\nprint $field->attribute('charset') || 'us-ascii';",
    "sections": {
        "NAME": {
            "content": "Mail::Message::Field - one line of a message header\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "Mail::Message::Field\nis a Mail::Reporter\n\nMail::Message::Field is extended by\nMail::Message::Field::Fast\nMail::Message::Field::Flex\nMail::Message::Field::Full\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $field = Mail::Message::Field->new(From => 'fish@tux.aq');\nprint $field->name;\nprint $field->body;\nprint $field->comment;\nprint $field->content;  # body & comment\n$field->print(\\*OUT);\nprint $field->string;\nprint \"$field\\n\";\nprint $field->attribute('charset') || 'us-ascii';\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This implementation follows the guidelines of rfc2822 as close as possible, and may there\nproduce a different output than implementations based on the obsolete rfc822. However, the old\noutput will still be accepted.\n\nThese objects each store one header line, and facilitates access routines to the information\nhidden in it. Also, you may want to have a look at the added methods of a message:\n\nmy @from    = $message->from;\nmy $sender  = $message->sender;\nmy $subject = $message->subject;\nmy $msgid   = $message->messageId;\n\nmy @to      = $message->to;\nmy @cc      = $message->cc;\nmy @bcc     = $message->bcc;\nmy @dest    = $message->destinations;\n\nmy $other   = $message->get('Reply-To');\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n",
            "subsections": []
        },
        "OVERLOADED": {
            "content": "overload: \"\"\n(stringification) produces the unfolded body of the field, which may be what you expect.\nThis is what makes what the field object seems to be a simple string. The string is produced\nby unfoldedBody().\n\nexample:\n\nprint $msg->get('subject');  # via overloading\nprint $msg->get('subject')->unfoldedBody; # same\n\nmy $subject = $msg->get('subject') || 'your mail';\nprint \"Re: $subject\\n\";\n\noverload: 0+\n(numification) When the field is numeric, the value will be returned. The result is produced\nby toInt(). If the value is not correct, a 0 is produced, to simplify calculations.\n\noverload: <=>\n(numeric comparison) Compare the integer field contents with something else.\n\nexample:\n\nif($msg->get('Content-Length') > 10000) ...\nif($msg->size > 10000) ... ; # same, but better\n\noverload: bool\nAlways true, to make it possible to say \"if($field)\".\n\noverload: cmp\n(string comparison) Compare the unfolded body of a field with another field or a string,\nusing the buildin \"cmp\".\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in Mail::Reporter.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in Mail::Reporter.\n\n$obj->clone()\nCreate a copy of this field object.\n\nMail::Message::Field->new($data)\nSee Mail::Message::Field::Fast::new(), Mail::Message::Field::Flex::new(), and\nMail::Message::Field::Full::new(). By default, a \"Fast\" field is produced.\n\n-Option--Defined in     --Default\nlog     Mail::Reporter   'WARNINGS'\ntrace   Mail::Reporter   'WARNINGS'\n\nlog => LEVEL\ntrace => LEVEL\n"
                },
                {
                    "name": "The field",
                    "content": "$obj->isStructured()\nMail::Message::Field->isStructured()\nSome fields are described in the RFCs as being *structured*: having a well described syntax.\nThese fields have common ideas about comments and the like, what they do not share with\nunstructured fields, like the \"Subject\" field.\n\nexample:\n\nmy $field = Mail::Message::Field->new(From => 'me');\nif($field->isStructured)\n\nMail::Message::Field->isStructured('From');\n\n$obj->length()\nReturns the total length of the field in characters, which includes the field's name, body\nand folding characters.\n\n$obj->nrLines()\nReturns the number of lines needed to display this header-line.\n\n$obj->print( [$fh] )\nPrint the whole header-line to the specified file-handle. One line may result in more than\none printed line, because of the folding of long lines. The $fh defaults to the selected\nhandle.\n\n$obj->size()\nReturns the number of bytes needed to display this header-line, Same as length().\n\n$obj->string( [$wrap] )\nReturns the field as string. By default, this returns the same as folded(). However, the\noptional $wrap will cause to re-fold to take place (without changing the folding stored\ninside the field).\n\n$obj->toDisclose()\nReturns whether this field can be disclosed to other people, for instance when sending the\nmessage to another party. Returns a \"true\" or \"false\" condition. See also\nMail::Message::Head::Complete::printUndisclosed().\n"
                },
                {
                    "name": "Access to the name",
                    "content": "$obj->Name()\nReturns the name of this field in original casing. See name() as well.\n\n$obj->name()\nReturns the name of this field, with all characters lower-cased for ease of comparison. See\nName() as well.\n\n$obj->wellformedName( [STRING] )\n(Instance method class method) As instance method, the current field's name is correctly\nformatted and returned. When a STRING is used, that one is formatted.\n\nexample:\n\nprint Mail::Message::Field->Name('content-type')\n# -->  Content-Type\n\nmy $field = $head->get('date');\nprint $field->Name;\n# -->  Date\n"
                },
                {
                    "name": "Access to the body",
                    "content": "$obj->body()\nThis method may be what you want, but usually, the foldedBody() and unfoldedBody() are what\nyou are looking for. This method is cultural heritage, and should be avoided.\n\nReturns the body of the field. When this field is structured, it will be stripped from\neverything what is behind the first semi-color (\";\"). In any case, the string is unfolded.\nWhether the field is structured is defined by isStructured().\n\n$obj->folded()\nReturns the folded version of the whole header. When the header is shorter than the wrap\nlength, a list of one line is returned. Otherwise more lines will be returned, all but the\nfirst starting with at least one blank. See also foldedBody() to get the same information\nwithout the field's name.\n\nIn scalar context, the lines are delived into one string, which is a little faster because\nthat's the way they are stored internally...\n\nexample:\n\nmy @lines = $field->folded;\nprint $field->folded;\nprint scalar $field->folded; # faster\n\n$obj->foldedBody( [$body] )\nReturns the body as a set of lines. In scalar context, this will be one line containing\nnewlines. Be warned about the newlines when you do pattern matching on the result of this\nmethod.\n\nThe optional $body argument changes the field's body. The folding of the argument must be\ncorrect.\n\n$obj->stripCFWS( [STRING] )\nMail::Message::Field->stripCFWS( [STRING] )\nRemove the *comments* and *folding white spaces* from the STRING. Without string and only as\ninstance method, the unfoldedBody() is being stripped and returned.\n\nWARNING: This operation is only allowed for structured header fields (which are defined by\nthe various RFCs as being so. You don't want parts within braces which are in the Subject\nheader line to be removed, to give an example.\n\n$obj->unfoldedBody( [$body, [$wrap]] )\nReturns the body as one single line, where all folding information (if available) is\nremoved. This line will also NOT end on a new-line.\n\nThe optional $body argument changes the field's body. The right folding is performed before\nassignment. The $wrap may be specified to enforce a folding size.\n\nexample:\n\nmy $body = $field->unfoldedBody;\nprint \"$field\";   # via overloading\n"
                },
                {
                    "name": "Access to the content",
                    "content": "$obj->addresses()\nReturns a list of Mail::Address objects, which represent the e-mail addresses found in this\nheader line.\n\nexample:\n\nmy @addr = $message->head->get('to')->addresses;\nmy @addr = $message->to;\n\n$obj->attribute( $name, [$value] )\nGet the value of an attribute, optionally after setting it to a new value. Attributes are\npart of some header lines, and hide themselves in the comment field. If the attribute does\nnot exist, then \"undef\" is returned. The attribute is still encoded.\n\nexample:\n\nmy $field = Mail::Message::Field->new(\n'Content-Type: text/plain; charset=\"us-ascii\"');\n\nprint $field->attribute('charset');\n# --> us-ascii\n\nprint $field->attribute('bitmap') || 'no'\n# --> no\n\n$field->atrribute(filename => '/tmp/xyz');\n$field->print;\n# --> Content-Type: text/plain; charset=\"us-ascii\";\n#       filename=\"/tmp/xyz\"\n# Automatically folded, and no doubles created.\n\n$obj->attributes()\nReturns a list of key-value pairs, where the values are not yet decoded. Keys may appear\nmore than once.\n\nexample:\n\nmy @pairs = $head->get('Content-Disposition')->attributes;\n\n$obj->comment( [STRING] )\nReturns the unfolded comment (part after a semi-colon) in a structureed header-line.\noptionally after setting it to a new STRING first. When \"undef\" is specified as STRING, the\ncomment is removed. Whether the field is structured is defined by isStructured().\n\nThe *comment* part of a header field often contains \"attributes\". Often it is preferred to\nuse attribute() on them.\n\n$obj->study()\nStudy the header field in detail: turn on the full parsing and detailed understanding of the\ncontent of the fields. Mail::Message::Field::Fast and Mail::Message::Field::Fast objects\nwill be transformed into any Mail::Message::Field::Full object.\n\nexample:\n\nmy $subject = $msg->head->get('subject')->study;\nmy $subject = $msg->head->study('subject');  # same\nmy $subject = $msg->study('subject');        # same\n\n$obj->toDate( [$time] )\nMail::Message::Field->toDate( [$time] )\nConvert a timestamp into an rfc2822 compliant date format. This differs from the default\noutput of \"localtime\" in scalar context. Without argument, the \"localtime\" is used to get\nthe current time. $time can be specified as one numeric (like the result of \"time()\") and as\nlist (like produced by c<localtime()> in list context).\n\nBe sure to have your timezone set right, especially when this script runs automatically.\n\nexample:\n\nmy $now = time;\nMail::Message::Field->toDate($now);\nMail::Message::Field->toDate(time);\n\nMail::Message::Field->toDate(localtime);\nMail::Message::Field->toDate;      # same\n# returns something like:\n#     Wed, 28 Aug 2002 10:40:25 +0200\n\n$obj->toInt()\nReturns the value which is related to this field as integer. A check is performed whether\nthis is right.\n"
                },
                {
                    "name": "Other methods",
                    "content": "$obj->dateToTimestamp(STRING)\nMail::Message::Field->dateToTimestamp(STRING)\nConvert a STRING which represents and RFC compliant time string into a timestamp like is\nproduced by the \"time\" function.\n"
                },
                {
                    "name": "Internals",
                    "content": "$obj->consume( $line | <$name,<$body|$objects>> )\nAccepts a whole field $line, or a pair with the field's $name and $body. In the latter case,\nthe $body data may be specified as array of $objects which are stringified. Returned is a\nnicely formatted pair of two strings: the field's name and a folded body.\n\nThis method is called by new(), and usually not by an application program. The details about\nconverting the $objects to a field content are explained in \"Specifying field data\".\n\n$obj->defaultWrapLength( [$length] )\nAny field from any header for any message will have this default wrapping. This is\nmaintained in one global variable. Without a specified $length, the current value is\nreturned. The default is 78.\n\n$obj->fold( $name, $body, [$maxchars] )\nMail::Message::Field->fold( $name, $body, [$maxchars] )\nMake the header field with $name fold into multiple lines. Wrapping is performed by\ninserting newlines before a blanks in the $body, such that no line exceeds the $maxchars and\neach line is as long as possible.\n\nThe RFC requests for folding on nice spots, but this request is mainly ignored because it\nwould make folding too slow.\n\n$obj->setWrapLength( [$length] )\nForce the wrapping of this field to the specified $length characters. The wrapping is\nperformed with fold() and the results stored within the field object.\n\nexample: refolding the field\n\n$field->setWrapLength(99);\n\n$obj->stringifyData(STRING|ARRAY|$objects)\nThis method implements the translation of user supplied objects into ascii fields. The\nprocess is explained in \"Specifying field data\".\n\n$obj->unfold(STRING)\nThe reverse action of fold(): all lines which form the body of a field are joined into one\nby removing all line terminators (even the last). Possible leading blanks on the first line\nare removed as well.\n"
                },
                {
                    "name": "Error handling",
                    "content": "Extends \"Error handling\" in Mail::Reporter.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Message::Field->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::Field->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Field->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                },
                {
                    "name": "Cleanup",
                    "content": "Extends \"Cleanup\" in Mail::Reporter.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                }
            ]
        },
        "DETAILS": {
            "content": "",
            "subsections": [
                {
                    "name": "Field syntax",
                    "content": "Fields are stored in the header of a message, which are represented by Mail::Message::Head\nobjects. A field is a combination of a *name*, *body*, and *attributes*. Especially the term\n\"body\" is cause for confusion: sometimes the attributes are considered to be part of the body.\n\nThe name of the field is followed by a colon (\"\":\"\", not preceded by blanks, but followed by one\nblank). Each attribute is preceded by a separate semi-colon (\"\";\"\"). Names of fields are\ncase-insensitive and cannot contain blanks.\n\n. Example: of fields\n\nCorrect fields:\n\nField: hi!\nContent-Type: text/html; charset=latin1\n\nIncorrect fields, but accepted:\n\nField : wrong, blank before colon\nField:                 # wrong, empty\nField:not nice, blank preferred after colon\nOne Two: wrong, blank in name\n\nFolding fields\nFields which are long can be folded to span more than one line. The real limit for lines in\nmessages is only at 998 characters, however such long lines are not easy to read without support\nof an application. Therefore rfc2822 (which defines the message syntax) specifies explicitly\nthat field lines can be re-formatted into multiple sorter lines without change of meaning, by\nadding new-line characters to any field before any blank or tab.\n\nUsually, the lines are reformatted to create lines which are 78 characters maximum. Some\napplications try harder to fold on nice spots, like before attributes. Especially the \"Received\"\nfield is often manually folded into some nice layout. In most cases however, it is preferred to\nproduce lines which are as long as possible but max 78.\n\nBE WARNED that all fields can be subjected to folding, and that you usually want the unfolded\nvalue.\n\n. Example: of field folding\n\nSubject: this is a short line, and not folded\n\nSubject: this subject field is much longer, and therefore\nfolded into multiple\nlines, although one more than needed.\n\nStructured fields\nThe rfc2822 describes a large number of header fields explicitly. These fields have a defined\nmeaning. For some of the fields, like the \"Subject\" field, the meaning is straight forward the\ncontents itself. These fields are the *Unstructured Fields*.\n\nOther fields have a well defined internal syntax because their content is needed by e-mail\napplications. For instance, the \"To\" field contains addresses which must be understood by all\napplications in the same way. These are the *Structured Fields*, see isStructured().\n\nComments in fields\nStuctured fields can contain comments, which are pieces of text enclosed in parenthesis. These\ncomments can be placed close to anywhere in the line and must be ignored be the application. Not\nall applications are capable of handling comments correctly in all circumstances.\n\n. Example: of field comments\n\nTo: mailbox (Mail::Box mailinglist) <mailbox@overmeer.net>\nDate: Thu, 13 Sep 2001 09:40:48 +0200 (CEST)\nSubject: goodbye (was: hi!)\n\nOn the first line, the text \"Mail::Box mailinglist\" is used as comment. Be warned that rfc2822\nexplicitly states that comments in e-mail address specifications should not be considered to\ncontain any usable information.\n\nOn the second line, the timezone is specified as comment. The \"Date\" field format has no way to\nindicate the timezone of the sender, but only contains the timezone difference to UTC, however\none could decide to add this as comment. Application must ignore this data because the \"Date\"\nfield is structured.\n\nThe last field is unstructured. The text between parentheses is an integral part of the subject\nline.\n"
                },
                {
                    "name": "Getting a field",
                    "content": "As many programs as there are handling e-mail, as many variations on accessing the header\ninformation are requested. Be careful which way you access the data: read the variations\ndescribed here and decide which solution suites your needs best.\n\nUsing get() field\nThe \"get()\" interface is copied from other Perl modules which can handle e-mail messages. Many\napplications which simply replace Mail::Internet objects by Mail::Message objects will work\nwithout modification.\n\nThere is more than one get method. The exact results depend on which get you use. When\nMail::Message::get() is called, you will get the unfolded, stripped from comments, stripped from\nattributes contents of the field as string. Character-set encodings will still be in the string.\nIf the same fieldname appears more than once in the header, only the last value is returned.\n\nWhen Mail::Message::Head::get() is called in scalar context, the last field with the specified\nname is returned as field object. This object strinigfies into the unfolded contents of the\nfield, including attributes and comments. In list context, all appearances of the field in the\nheader are returned as objects.\n\nBE WARNED that some lines seem unique, but are not according to the official rfc. For instance,\n\"To\" fields can appear more than once. If your program calls \"get('to')\" in scalar context, some\ninformation is lost.\n\n. Example: of using get()\n\nprint $msg->get('subject') || 'no subject';\nprint $msg->head->get('subject') || 'no subject';\n\nmy @to = $msg->head->get('to');\n\nUsing study() field\nAs the name \"study\" already implies, this way of accessing the fields is much more thorough but\nalso slower. The \"study\" of a field is like a \"get\", but provides easy access to the content of\nthe field and handles character-set decoding correctly.\n\nThe Mail::Message::study() method will only return the last field with that name as object.\nMail::Message::Head::study() and Mail::Message::Field::study() return all fields when used in\nlist context.\n\n. Example: of using study()\n\nprint $msg->study('subject') || 'no subject';\nmy @rec  = $msg->head->study('Received');\n\nmy $from = $msg->head->get('From')->study;\nmy $from = $msg->head->study('From');  # same\nmy @addr = $from->addresses;\n\nUsing resent groups\nSome fields belong together in a group of fields. For instance, a set of lines is used to define\none step in the mail transport process. Each step adds a \"Received\" line, and optionally some\n\"Resent-*\" lines and \"Return-Path\". These groups of lines shall stay together and in order when\nthe message header is processed.\n\nThe \"Mail::Message::Head::ResentGroup\" object simplifies the access to these related fields.\nThese resent groups can be deleted as a whole, or correctly constructed.\n\n. Example: of using resent groups\n\nmy $rgs = $msg->head->resentGroups;\n$rgs[0]->delete if @rgs;\n\n$msg->head->removeResentGroups;\n"
                },
                {
                    "name": "The field's data",
                    "content": "There are many ways to get the fields info as object, and there are also many ways to process\nthis data within the field.\n\nAccess to the field\n*   string()\n\nReturns the text of the body exactly as will be printed to file when print() is called, so\nname, main body, and attributes.\n\n*   foldedBody()\n\nReturns the text of the body, like string(), but without the name of the field.\n\n*   unfoldedBody()\n\nReturns the text of the body, like foldedBody(), but then with all new-lines removed. This\nis the normal way to get the content of unstructured fields. Character-set encodings will\nstill be in place. Fields are stringified into their unfolded representation.\n\n*   stripCFWS()\n\nReturns the text of structured fields, where new-lines and comments are removed from the\nstring. This is a good start for parsing the field, for instance to find e-mail addresses in\nthem.\n\n*   Mail::Message::Field::Full::decodedBody()\n\nStudied fields can produce the unfolded text decoded into utf8 strings. This is an expensive\nprocess, but the only correct way to get the field's data. More useful for people who are\nnot living in ASCII space.\n\n*   Studied fields\n\nStudied fields have powerful methods to provide ways to access and produce the contents of\n(structured) fields exactly as the involved rfcs prescribe.\n\nUsing simplified field access\nSome fields are accessed that often that there are support methods to provide simplified access.\nAll these methods are called upon a message directly.\n\n. Example: of simplified field access\n\nprint $message->subject;\nprint $message->get('subject') || '';  # same\n\nmy @from = $message->from; # returns addresses\n$message->reply->send if $message->sender;\n\nThe \"sender\" method will return the address specified in the \"Sender\" field, or the first named\nin the \"From\" field. It will return \"undef\" in case no address is known.\n\nSpecifying field data\nField data can be anything, strongly dependent on the type of field at hand. If you decide to\nconstruct the fields very carefully via some Mail::Message::Field::Full extension (like via\nMail::Message::Field::Addresses objects), then you will have protection build-in. However, you\ncan bluntly create any Mail::Message::Field object based on some data.\n\nWhen you create a field, you may specify a string, object, or an array of strings and objects.\nOn the moment, objects are only used to help the construction on e-mail addresses, however you\nmay add some of your own.\n\nThe following rules (implemented in stringifyData()) are obeyed given the argument is:\n\n*   a string\n\nThe string must be following the (complicated) rules of the rfc2822, and is made field\ncontent as specified. When the string is not terminated by a new-line (\"\\n\") it will be\nfolded according to the standard rules.\n\n*   a Mail::Address object\n\nThe most used Perl object to parse and produce address lines. This object does not\nunderstand character set encodings in phrases.\n\n*   a Mail::Identity object\n\nAs part of the User::Identity distribution, this object has full understanding of the\nmeaning of one e-mail address, related to a person. All features defined by rfc2822 are\nimplemented.\n\n*   a User::Identity object\n\nA person is specified, which may have more than one Mail::Identity's defined. Some methods,\nlike Mail::Message::reply() and Mail::Message::forward() try to select the right e-mail\naddress smart (see their method descriptions), but in other cases the first e-mail address\nfound is used.\n\n*   a User::Identity::Collection::Emails object\n\nAll Mail::Identity objects in the collection will be included in the field as a group\ncarying the name of the collection.\n\n*   any other object\n\nFor all other objects, the stringification overload is used to produce the field content.\n\n*   an ARRAY\n\nYou may also specify an array with a mixture of any of the above. The elements will be\njoined as comma-separated list. If you do not want comma's inbetween, you will have to\nprocess the array yourself.\n\n. Example: specifying simple field data\n\nmy $f = Mail::Message::Field->new(Subject => 'hi!');\nmy $b = Mail::Message->build(Subject => 'monkey');\n\n. Example: s specifying e-mail addresses for a field\n\nuse Mail::Address;\nmy $fish = Mail::Address->new('Mail::Box', 'fish@tux.aq');\nprint $fish->format;   # ==> Mail::Box <fish@tux.aq>\nmy $exa  = Mail::Address->new(undef, 'me@example.com');\nprint $exa->format;    # ==> me@example.com\n\nmy $b = $msg->build(To => \"you@example.com\");\nmy $b = $msg->build(To => $fish);\nmy $b = $msg->build(To => [ $fish, $exa ]);\n\nmy @all = ($fish, \"you@example.com\", $exa);\nmy $b = $msg->build(To => \\@all);\nmy $b = $msg->build(To => [ \"xyz\", @all ]);\n\n. Example: specifying identities for a field\n\nuse User::Identity;\nmy $patrik = User::Identity->new\n( name      => 'patrik'\n, fullname => \"Patrik Fältström\"  # from rfc\n, charset   => \"ISO-8859-1\"\n);\n$patrik->add\n( email    => \"him@home.net\"\n);\n\nmy $b = $msg->build(To => $patrik);\n\n$b->get('To')->print;\n# ==> =?ISO-8859-1?Q?PatrikF=E4ltstr=F6m?=\n#     <him@home.net>\n"
                },
                {
                    "name": "Field class implementation",
                    "content": "For performance reasons only, there are three types of fields: the fast, the flexible, and the\nfull understander:\n\n*   Mail::Message::Field::Fast\n\n\"Fast\" objects are not derived from a \"Mail::Reporter\". The consideration is that fields are\nso often created, and such a small objects at the same time, that setting-up a logging for\neach of the objects is relatively expensive and not really useful. The fast field\nimplementation uses an array to store the data: that will be faster than using a hash. Fast\nfields are not easily inheritable, because the object creation and initiation is merged into\none method.\n\n*   Mail::Message::Field::Flex\n\nThe flexible implementation uses a hash to store the data. The new() and \"init\" methods are\nsplit, so this object is extensible.\n\n*   Mail::Message::Field::Full\n\nWith a full implementation of all applicable RFCs (about 5), the best understanding of the\nfields is reached. However, this comes with a serious memory and performance penalty. These\nobjects are created from fast or flex header fields when study() is called.\n"
                }
            ]
        },
        "DIAGNOSTICS": {
            "content": "Warning: Field content is not numerical: $content\nThe numeric value of a field is requested (for instance the \"Lines\" or \"Content-Length\"\nfields should be numerical), however the data contains weird characters.\n\nWarning: Illegal character in field name $name\nA new field is being created which does contain characters not permitted by the RFCs. Using\nthis field in messages may break other e-mail clients or transfer agents, and therefore\nmutulate or extinguish your message.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
            "subsections": []
        }
    },
    "summary": "Mail::Message::Field - one line of a message header",
    "flags": [],
    "examples": [],
    "see_also": []
}