CGI-ContactForm
view release on metacpan or search on metacpan
lib/CGI/ContactForm.pm view on Meta::CPAN
The thought is that normal use, i.e. establishing contact with somebody,
should typically not be affected by those checks.
=head1 INSTALLATION
=head2 Installation with Makefile.PL
Type the following:
perl Makefile.PL
make
make install
=head2 Manual Installation
=over 4
=item *
Download the distribution file and extract the contents.
=item *
Designate a directory as your local library for Perl modules, for instance
/www/username/cgi-bin/lib
=item *
Create the directory C</www/username/cgi-bin/lib/CGI>, and upload
C<ContactForm.pm> to that directory.
=item *
Create the directory C</www/username/cgi-bin/lib/CGI/ContactForm>, and
upload C<MHonArc.pm> to that directory.
=item *
In the CGI scripts that use this module, include a line that tells Perl
to look for modules also in your local library, such as
use lib '/www/username/cgi-bin/lib';
=back
=head2 Other Installation Matters
If you have previous experience from installing CGI scripts, making
C<contact.pl> (or whichever name you choose) work should be easy.
Otherwise, this is a B<very> short lesson:
=over 4
=item 1.
Upload the CGI file in ASCII transfer mode to your C<cgi-bin>.
=item 2.
Set the file permission 755 (chmod 755).
=back
If that doesn't do it, there are many CGI tutorials for beginners
available on the web. This is one example:
http://my.execpc.com/~keithp/bdlogcgi.htm
On some servers, the CGI file must be located in the C<cgi-bin> directory
(or in a C<cgi-bin> subdirectory). At the same time it's worth noting,
that the style sheet typically needs to be located somewhere outside the
C<cgi-bin>.
=head1 DEPENDENCIES
C<CGI::ContactForm> requires the non-standard modules L<CGI.pm|CGI> and
L<Mail::Sender|Mail::Sender>.
=head1 AUTHENTICATION
If you have access to a mail server that is configured to automatically
accept sending messages from a CGI script to any address, you don't need
to worry about authentication. Otherwise you need to somehow authenticate
to the server, for instance by adding something like this right after the
C<use CGI::ContactForm;> line in C<contact.pl>:
%Mail::Sender::default = (
auth => 'LOGIN',
authid => 'username',
authpwd => 'password',
);
C<auth> is the SMTP authentication protocol. Common protocols are C<LOGIN>
and C<PLAIN>. You may need help from the mail server's administrator to
find out which protocol and username/password pair to use.
If there are multiple forms, a more convenient way to deal with a need
for authentication may be to make use of the C<Sender.config> file that
is included in the distribution. You just edit it and upload it to the
same directory as the one where C<Sender.pm> is located.
See the L<Mail::Sender|Mail::Sender> documentation for further guidance.
=head1 AUTHOR, COPYRIGHT AND LICENSE
Copyright (c) 2003-2019 Gunnar Hjalmarsson
http://www.gunnar.cc/cgi-bin/contact.pl
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 SEE ALSO
L<CGI::ContactForm::MHonArc|CGI::ContactForm::MHonArc>,
L<Mail::Sender|Mail::Sender>
=cut
use strict;
use File::Basename;
( run in 0.547 second using v1.01-cache-2.11-cpan-39bf76dae61 )