Mail::RoundTrip - Management routines for round trip validation of users' emails
Version 0.02
To send validation email:
my $validator = Mail::RoundTrip->new( spool_dir => '/var/spool/myapp/contacts', address => 'test@example.org', data => $data, from => 'me@example.com', reply_to => 'not_me@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, <chris.travers at gmail.com>
<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.
bug-mail-roundtrip at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Mail::RoundTrip
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mail-RoundTrip
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Mail-RoundTrip
CPAN Ratings
http://cpanratings.perl.org/d/Mail-RoundTrip
Search CPAN
http://search.cpan.org/dist/Mail-RoundTrip/
Copyright 2013 Chris Travers.
This program is released under the following license: BSD
To install Mail::RoundTrip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::RoundTrip
CPAN shell
perl -MCPAN -e shell install Mail::RoundTrip
For more information on module installation, please visit the detailed CPAN module installation guide.