SENDING ATTACHMENTS
(Auto Response Email File Attachments Config)


For every variable $ATTACHMENT_file{""} set, a corresponding variable $ATTACHMENT_attributes{""} should also be set. Both variables should contain the same value placed inside the double quotes, which are contained inside the brackets. {""}

The values set for $ATTACHMENT_attributes{""} should be the corresponding attributes for that file.

If bizmail.cgi is configed as:

$ATTACHMENT_file{"1"} = "page.pdf";
$ATTACHMENT_attributes{"1"} = "1,1";

Then in the example config above $ATTACHMENT_file{"1"} and $ATTACHMENT_attributes{"1"} have an "attachment number" of 1. This can easily be seen since the 1 is contained inside the double quotes, which are contained inside of the brackets. ie. {"1"}

In the example above, if the "attachment number" 1 is called from the hidden form field: name="file_attachments", the attachment "page.pdf" will be attached to the auto-response email.

Next, after the $ATTACHMENT_file{""} variable is identified, the corresponding $ATTACHMENT_attributes{""}, variable will be used, which in this example is set as:

$ATTACHMENT_attributes{"1"} = "2,1";

This variable is used to pull up the other information needed for that file by two numeric values. The first numeric value should be separated by a coma, which indicates the start of the second numeric value.

The first numeric value calls the variable $ATTACHMENT_path{""}, which is the absolute server path to the file that is being attached.

The second numeric value calls the variable $ATTACHMENT_type{""}, which is the "Content Type" of the file.

Continuing on with the same example, $ATTACHMENT_attributes{"1"} = "2,4";

Then if the rest of the bizmail.cgi config looks like this:


## ATTACHMENT FILE PATHS (WITH TRAILING /) ##

$ATTACHMENT_path{"1"} = "/path/to/attachment/";
$ATTACHMENT_path{"2"} = "/path/to/attachment2/";
$ATTACHMENT_path{"3"} = "/path/to/attachment3/";

## ATTACHMENT CONTENT-TYPES ##

$ATTACHMENT_type{"1"} = "application/msword"; # MICROSOFT WORD DOC #
$ATTACHMENT_type{"2"} = "text/html"; # HTML WEB PAGE #
$ATTACHMENT_type{"3"} = "text/plain"; # PLAIN TEXT FILE #
$ATTACHMENT_type{"4"} = "application/pdf"; # PDF DOCUMENT #

This would mean that in the example followed thus far, the variable $ATTACHMENT_attributes{"1"} = "2,4"; would then idetify the two variables to use.

1. Since "2" was the first numeric value it would pull from the above example config:

$ATTACHMENT_path{"2"} = "/path/to/attachment2/";

As previously mentioned, this variable indicates the value of the absolute server path to the file attachment.

2. Since "4" was the second numeric value specified, it would pull from the above example config:

$ATTACHMENT_type{"4"} = "application/pdf";

As previously mentioned, this variable indicates the content type of the file attachment.

You can send as many file attachments with the auto-response email as you would like. Simply list all corresponding attachment numbers separated by a coma.

For example, if the hidden form field name="file_attachments" is set as: <input type="hidden" name="file_attachments" value="2,3"> it would send the attachments that correspond to the attachment numbers 2 & 3.

You can send as many attachments as you would like. Simply list them all and separate each attachment number by a coma.