Subject: | [REGRESSION] New 'To' check inconsistent with docs in 0.06 |
As of 0.06, there is a check in email() for a 'To' field. However, this
checks the main argument list, not the 'headers' array. So the code in
the documentation all fails:
$c->email(header => [To => 'foo@example.com'],
body => 'Hi!');
The code says:
my $email = $_[1] ? {@_} : $_[0];
croak "Can't send mail without recipient"
unless length($email->{To});
In this example, $email has keys qw(header body), not 'To'. I haven't
tested enough to know if the mistake is in the code or the documentation...
Thanks,
Chris