Email::Sender::Transport::Redirect - Intercept all emails and redirect them to a specific address
Version 0.006
$transport_orig = Email::Sender::Transport::Sendmail->new; $transport = Email::Sender::Transport::Redirect->new({transport => $transport_orig, redirect_address => 'shop@nitesi.com', });
Transport wrapper for Email::Sender which intercepts all emails and redirects them to a specific address.
This transport changes the To and CC header in the email and adds a X-Intercepted-To and X-Intercepted-CC header with the original recipients.
To
CC
X-Intercepted-To
X-Intercepted-CC
Recipient email address for redirected emails. This value, which can be either a string or an hashref, is passed to the Email::Sender::Transport::Redirect::Recipients constructor.
Email headers to be changed, defaults to an array reference containing:
Prefix for headers which show the original recipients.
Defaults to X-Intercepted-.
X-Intercepted-
Wraps around original method and changes email headers.
Stefan Hornburg (Racke), racke@linuxia.de
racke@linuxia.de
Thanks to Peter Mottram for the port to Moo (GH #1).
Thanks to Matt Trout for his help regarding the initial write of this module on #dancer IRC.
Copyright 2012-2015 Stefan Hornburg (Racke).
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Email::Sender::Transport::Redirect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Sender::Transport::Redirect
CPAN shell
perl -MCPAN -e shell install Email::Sender::Transport::Redirect
For more information on module installation, please visit the detailed CPAN module installation guide.