Mail::Toaster::CGI

- NAME
- SYNOPSIS
- DESCRIPTION

- SetQSStatsSubmit
- SetIsoqlogSubmit
- SetRRDutilSubmit
- ExpireCookies
- SetQmailadminSubmit
- SetSqwebmailSubmit
- SetSquirrelmailSubmit
- SetCookies
- SetSSLLine
- SetCookieLine
- SetEmailLine
- ProcessShell

- AUTHOR
- BUGS
- TODO
- SEE ALSO
- COPYRIGHT

# NAME

Mail::Toaster::CGI

# SYNOPSIS

index.cgi - A pretty web interface that showcases all the features of the mail toaster.

This module contains the subroutines that are used by index.cgi. They're named well so you should have no problems reading through index.cgi and understanding exactly what it's doing.

# DESCRIPTION

A cgi application and HTML template for a standard mail page.

## SetQSStatsSubmit

            use Mail::Toaster::CGI;
            SetQSStatsSubmit($conf, $ssl, $host);

Generate the HTML code that renders the Qmail Scanner Statistics table and form that you see in index.cgi.

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection, $host is the hostname to submit the form to, and $path is the path to isoqlog on the remote server. A typical invocation might look like this:

            SetIsoqlogSubmit($conf, 1, "matt.cadillac.net" );

## SetIsoqlogSubmit

            use Mail::Toaster::CGI;
            SetIsoqlogSubmit($conf, $ssl, $host);

Generate the HTML code that renders the Isoqlog table and form that you see in index.cgi.

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection, $host is the hostname to submit the form to. A typical invocation might look like this:

            SetIsoqlogSubmit($conf, 1, "matt.cadillac.net");

## SetRRDutilSubmit

            use Mail::Toaster::CGI;
            SetRRDutilSubmit($conf, $ssl, $host);

Generate the HTML code that renders the table and embedded form that you see in index.cgi.

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection. $host is the hostname to submit the form to.

## ExpireCookies

Very simple use of CGI's cookie method. To expire the cookie we just set it's expiration to a negative value.

## SetQmailadminSubmit

            use Mail::Toaster::CGI;
            SetQmailadminSubmit($conf, $ssl, $host);

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection. $host is the hostname to submit the form to.

## SetSqwebmailSubmit

            use Mail::Toaster::CGI;
            SetSqwebmailSubmit($conf, $ssl, $host);

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection. $host is the hostname to submit the form to.

## SetSquirrelmailSubmit

            use Mail::Toaster::CGI;
            SetSquirrelmailSubmit($conf, $ssl, $host);

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection. $host is the hostname to submit the form to. $path is the installed URL path on the server.

## SetCookies

Very simple use of CGI's cookie method. We save a cookie with the users email address and another one for for whether they selected Use SSL.

## SetSSLLine

            use Mail::Toaster::CGI;
            SetSSLLine($ssl, $editable);

$ssl is a binary value, representing whether the form URL should be http or https, based on the users selection. $editable is a binary value, determining if the SSL preference is available or not.

## SetCookieLine

            use Mail::Toaster::CGI;
            SetCookieLine($save);

$save is a binary value, are the users settings saved or not?

## SetEmailLine

            use Mail::Toaster::CGI;
            SetEmailLine($address, $editable);

$address is the email address to display in the form.

$editable is whether or not the address field is editable.

## ProcessShell

Since we're a CGI app, we don't expect to be run from the command line except to test. This little sub just lets you know everything that was supposed to load did and that the CGI should work right.

# AUTHOR

Matt Simerson <matt@tnpi.biz>

# BUGS

None known. Report any to author.

# TODO

Wow, TODO is caught up. Yay!

# SEE ALSO

Mail::Toaster::CGI, Mail::Toaster::DNS, Mail::Toaster::Logs, Mail::Toaster::Qmail, Mail::Toaster::Setup

# COPYRIGHT

Copyright 2003, The Network People, Inc. All Rights Reserved.