CGI::ContactForm is a Perl module that can generate a web contact form.
SYNOPSIS
use CGI::ContactForm;
contactform (
recname => 'John Smith',
recmail => 'john.smithaexample.com',
styleurl => '/style/ContactForm.css',
);
This module generates a contact form for the web when the routine contactform() is called from a CGI script. Arguments are passed to the module as a list of key/value pairs.
CGI::ContactForm sends a well formated (plain text format=flowed in accordance with RFC 2646) email message, with the sender's address in the From: header.
By default the sender gets a bcc copy. If the email address stated by the sender is invalid, by default the failure message is sent to the recipient address, through which you know that you don't need to bother with a reply, at least not to that address... However, by setting the nocopy argument you can prevent the sender copy from being sent.
Arguments
CGI::ContactForm takes the following arguments:
Default value
=============
Compulsory
----------
recname (none)
recmail (none)
Optional
--------
smtp 'localhost'
styleurl (none)
returnlinktext 'Main Page'
returnlinkurl '/'
subject (none)
nocopy 0
bouncetosender 0
formtmplpath (none)
resulttmplpath (none)
maxsize 100 (KiB)
tempdir (none)
spamfilter '(?i:|[/url])' (Perl regex)
Additional arguments, intended for forms at non-English sites
-------------------------------------------------------------
title 'Send email to'
namelabel 'Your name:'
emaillabel 'Your email:'
subjectlabel 'Subject:'
msglabel 'Message:'
reset 'Reset'
send 'Send'
erroralert 'Fields with %s need to be filled or corrected.'
marked 'marked labels'
thanks 'Thanks for your message!'
sent_to 'The message was sent to %s with a copy to %s.'
sent_to_short 'The message was sent to %s.'
encoding 'iso-8859-1'
Customization
There are only two compulsory arguments. The example CGI script contact.pl, that is included in the distribution, also uses the styleurl argument, assuming the use of the enclosed style sheet ContactForm.css. That results in a decently styled form with a minimum of effort.
If the default value localhost isn't sufficient to identify the local SMTP server, you may need to explicitly state its host name or IP address via the smtp argument.
As you can see from the list over available arguments, all the text strings can be changed, and as regards the presentation, you can of course edit the style sheet to your liking.
If you want to modify the HTML markup, you can have CGI::ContactForm make use of one or two templates. The enclosed example templates ContactForm_form.tmpl and ContactForm_result.tmpl can be activated via the formtmplpath respective resulttmplpath arguments, and used as a starting point for a customized markup.
Product's homepage
Requirements:
· Perl
What's New in Version
· MIME encoding (quoted-printable) of bytes representing non-ASCII characters was added.
· Max line length will refer to characters, not bytes (if Encode is installed).
Download CGI::ContactForm 1.50 Free
Tags: contact form , CGI form , Perl module , CGI , web , contact ,
none, arguments, address, message, default, ·, module, perl, message sent, need, cgicontactform, sent, smtp, copy, email, styleurl, sender, 'the message sent, 'the message, default value, cgi script, argument, nocopy, via, bytes
Hiç yorum yok:
Yorum Gönder