{
    "mode": "perldoc",
    "parameter": "Email::MessageID",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Email%3A%3AMessageID/json",
    "generated": "2026-10-08T08:55:51Z",
    "synopsis": "use Email::MessageID;\nmy $mid = Email::MessageID->new->inbrackets;\nprint \"Message-ID: $mid\\x0D\\x0A\";",
    "sections": {
        "NAME": {
            "content": "Email::MessageID - Generate world unique message-ids.\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 1.408\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Email::MessageID;\n\nmy $mid = Email::MessageID->new->inbrackets;\n\nprint \"Message-ID: $mid\\x0D\\x0A\";\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Message-ids are optional, but highly recommended, headers that identify a message uniquely. This\nsoftware generates a unique message-id.\n",
            "subsections": []
        },
        "PERL VERSION": {
            "content": "This library should run on perls released even a long time ago. It should work on any version of\nperl released in the last five years.\n\nAlthough it may work on older versions of perl, no guarantee is made that the minimum required\nversion will not be increased. The version may be increased for any reason, and there is no\npromise that patches will be accepted to lower the minimum required perl.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\nmy $mid = Email::MessageID->new;\n\nmy $newmid = Email::MessageID->new( host => $myhost );\n\nThis class method constructs an Email::MessageID object containing a unique message-id. You may\nspecify custom \"host\" and \"user\" parameters.\n\nBy default, the \"host\" is generated from \"Sys::Hostname::hostname\".\n\nBy default, the \"user\" is generated using \"Time::HiRes\"'s \"gettimeofday\" and the process ID.\n\nUsing these values we have the ability to ensure world uniqueness down to a specific process\nrunning on a specific host, and the exact time down to six digits of microsecond precision.\n\ncreatehost\nmy $domainpart = Email::MessageID->createhost;\n\nThis method returns the domain part of the message-id.\n\ncreateuser\nmy $localpart = Email::MessageID->createuser;\n\nThis method returns a unique local part for the message-id. It includes some random data and\nsome predictable data.\n\ninbrackets\nWhen using Email::MessageID directly to populate the \"Message-ID\" field, be sure to use\n\"inbrackets\" to get the string inside angle brackets:\n\nheader => [\n...\n'Message-Id' => Email::MessageID->new->inbrackets,\n],\n\nDon't make this common mistake:\n\nheader => [\n...\n'Message-Id' => Email::MessageID->new->asstring, # WRONG!\n],\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "*   Casey West <casey@geeknest.com>\n\n*   Ricardo SIGNES <cpan@semiotic.systems>\n",
            "subsections": []
        },
        "CONTRIBUTORS": {
            "content": "*   Aaron Crane <arc@cpan.org>\n\n*   Pali <pali@cpan.org>\n\n*   Ricardo Signes <rjbs@semiotic.systems>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2004 by Casey West.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
            "subsections": []
        }
    },
    "summary": "Email::MessageID - Generate world unique message-ids.",
    "flags": [],
    "examples": [],
    "see_also": []
}