email::messageid 1.400

rjbs on 2008-10-03T11:48:51

I've uploaded a new Email::MessageID, version 1.400. It has two major improvements. First, the result of its new method is now an Email::MessageID object, where it was previously an Email::Address object(!). This means that it can now have its own message-id-specific methods. It has one: in_brackets. This is a very common mistake:

my $email = Email::Simple->create(
  body   => ...,
  header => [
    ...
    'Message-Id' => Email::MessageID->new->as_string,
  ],
);

This would produce a bogus message. Message-Ids must be in angle brackets. Rather than fix as_string and break the code of everyone who was already dealing with this, I've added in_brackets. Use it!


Show the right way

brian_d_foy on 2008-10-03T13:55:39

Maybe you should show the right way to do it, and put a big "#WRONG WRONG WRONG" next to that as_string :)