Mail::RoundTrip - Management routines for round trip validation of users' emails
To send validation email:
my $validator = Mail::RoundTrip->new( spool_dir => '/var/spool/myapp/contacts', address => 'email@example.com', data => $data, from => 'firstname.lastname@example.org', reply_to => 'email@example.com', ); my $code = $validator->code; $validator->send_confirmation(template => $template);
To retrieve based on validation code:
my $data = Mail::RoundTrip->get_data( code => $code, spool_dir => $dir );
Many web applicatins rely on some sort of round-trip validation of user emails. This verifies that the email address, for example, is actually owned by the user. This module provides a minimalist set of routines for managing this process.
The module is curently minimalistic because it is assumed it will provide the common back-ends for a number of related verification routines. Extensions and feature requests are welcome. The module exposes a fully object-oriented interface.
The module basically provides a minimalist spooling service for holding data for later processing once the code has been provided.
The email address to be confirmed.
This is the random code used to authenticate the request. Currently this is generated as an sha2 256-bit hash of a pseudo-random value.
The address in the from header.
The address in the reply to header.
The return path fo the email.
The data to be queued.
The spool directory to be used.
This process the text in template $template, replacing __CODE__ with $self->code, setting the subject to "$subpfx $self->code" and sending out the email to the address provided.
This gets the data from spool_dir/directory and unlinks the file.
<chris.travers at gmail.com>
Please report any bugs or feature requests to
bug-mail-roundtrip at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mail-RoundTrip. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2013 Chris Travers.
This program is released under the following license: BSD