Email::Send::Test is a driver for use in testing applications that use Email::Send to send email.

To be able to use it in testing, you will need some sort of configuration mechanism to specify the delivery method to be used, or some other way that in your testing scripts you can convince your code to use "Test" as the mailer, rather than "Sendmail" or another real mailer.

As for every other Email::Send mailer, send takes the message to be sent.

However, in our case there are no arguments of any value to us, and so they are ignored.

It is worth nothing that we do NOTHING to check or alter the email. For example, if we are passed undef it ends up as is in the trap. In this manner, you can see exactly what was sent without any possible tampering on the part of the testing mailer.

Of course, this doesn't prevent any tampering by Email::Send itself :)