GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Email::MessageID(3) User Contributed Perl Documentation Email::MessageID(3)

Email::MessageID - Generate world unique message-ids.

version 1.406

  use Email::MessageID;

  my $mid = Email::MessageID->new->in_brackets;

  print "Message-ID: $mid\x0D\x0A";

Message-ids are optional, but highly recommended, headers that identify a message uniquely. This software generates a unique message-id.

  my $mid = Email::MessageID->new;

  my $new_mid = Email::MessageID->new( host => $myhost );

This class method constructs an Email::Address object containing a unique message-id. You may specify custom "host" and "user" parameters.

By default, the "host" is generated from "Sys::Hostname::hostname".

By default, the "user" is generated using "Time::HiRes"'s "gettimeofday" and the process ID.

Using these values we have the ability to ensure world uniqueness down to a specific process running on a specific host, and the exact time down to six digits of microsecond precision.

  my $domain_part = Email::MessageID->create_host;

This method returns the domain part of the message-id.

  my $local_part = Email::MessageID->create_user;

This method returns a unique local part for the message-id. It includes some random data and some predictable data.

When using Email::MessageID directly to populate the "Message-ID" field, be sure to use "in_brackets" to get the string inside angle brackets:

  header => [
    ...
    'Message-Id' => Email::MessageID->new->in_brackets,
  ],

Don't make this common mistake:

  header => [
    ...
    'Message-Id' => Email::MessageID->new->as_string, # WRONG!
  ],

  • Casey West <casey@geeknest.com>
  • Ricardo SIGNES <rjbs@cpan.org>

Aaron Crane <arc@cpan.org>

This software is copyright (c) 2004 by Casey West.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2015-08-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.