Catalyst::Plugin::Email::Page - Email your Catalyst page
This document describes Catalyst::Plugin::Email::Page version 0.26
use Catalyst::Plugin::Email::Page; __PACKAGE__->config->{email_page}{ email = q{webmaster@example.com}, subject = q{User Report for}, link_text = q{Report Page}, }; # In your Template [% c.email_page_url %]
This is a simple plugin that lets a developer set and forget e-mail links in Catalyst
Returns a link in the form of: mailto:webmaster@example.com?subject=User Report for http://yours.com/
The mailto subject is escaped using uri_escape_utf8 from URI::Escape and http://yours.com/ is the current pages uri
uri_escape_utf8
Allows you to e-mail the whole page to someone once you have the right template. Used the same way as email_page_url
email_page_url
To do.
Allows you to e-mail a page anchor. Used the same way as email_page_url
Internal routine.
Reads in the various configuration settings and constructs the mailto link. See "CONFIGURATION AND ENVIRONMENT"
Can't locate Readonly.pm in @INC (@INC contains:
Readonly is required
Install it via the usual ways:
cpan Readonly perl -MCPAN -e shell
Can't locate URI/Escape.pm in @INC (@INC contains:
URI::Escape is required. See above for standard way to install
Catalyst::Plugin::Email::Page requires no configuration files or environment variables, but you'd best change the mailto address.
mailto
Set Configuration to be loaded via Config.yml in YourApp.pm
use YAML qw(LoadFile); use Path::Class 'file'; __PACKAGE__->config( LoadFile( file(__PACKAGE__->config->{home}, 'Config.yml') ) );
Settings in Config.yml
# Email::Page email_page: email: support@example.com subject: Error Report for link_text: Report Me
Readonly, URI::Escape and of course Catalyst
None reported.
Initial Bug ID 17248, as reported by CPAN ID DAKKAR
Fixed in version 0.25, which now escapes the mailto subject, hence the URI::Escape requirement.
Thanks DAKKAR.
Please report any bugs or feature requests to bug-catalyst-plugin-email-page@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-catalyst-plugin-email-page@rt.cpan.org
Add more methods.
Finish empty ones and add settings for using images instead of link text.
More Tests!
Gavin Henry <ghenry@suretecsystems.com>
<ghenry@suretecsystems.com>
Copyright (c) 2006, Gavin Henry <ghenry@suretecsystems.com>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Catalyst::Plugin::Email::Page, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Email::Page
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Email::Page
For more information on module installation, please visit the detailed CPAN module installation guide.