{
    "mode": "perldoc",
    "parameter": "Email::MessageID",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Email%3A%3AMessageID/json",
    "generated": "2026-06-09T13:06:09Z",
    "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.406\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": []
        },
        "METHODS": {
            "content": "new\nmy $mid = Email::MessageID->new;\n\nmy $newmid = Email::MessageID->new( host => $myhost );\n\nThis class method constructs an Email::Address 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 <rjbs@cpan.org>\n",
            "subsections": []
        },
        "CONTRIBUTOR": {
            "content": "Aaron Crane <arc@cpan.org>\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": []
}