Email options

The [Email options] section of the settings file is concerned with the email sent to the site owner after the form is successfully submitted.

The format of each setting in this section is

keyword = value

Keywords

The following keywords are recognised:

KeywordPurpose
ToAddressthe email address where notification will be sent when the visitor submits the form (your email address)
BccAddressemail notification will be Bcc'd to this address if present
FromAddressemail will appear to come from this address (unless visitor supplies an address in the fEmail standard field)
FromNameemail will use this as the visitor's name (unless the visitor supplies a name in the fFirstName and fLastName, or the fName standard field)
Subjecttext for the email subject. It may include one or more placeholders: %fSubject%, %fName%, %fFirstName%, %fLastName% - see standard fields
EmailFormatSpecifies the format of the email sent to you - html or plain (default is html)
EmailStart*Introduction text to appear at the start of the email sent to you.
EmailField*Template for one field in the email. It must contain the placeholders %FieldName% and %FieldValue%. The default template is <b>%FieldName%</b>: %FieldValue%<br /> which is suitable for HTML EmailFormat. If you want the fields to be presented in an HTML table, this template can be a single table row, and you should place the opening table tag in the EmailStart setting and its closing tag in the EmailExtra setting.
EmailExtra*text to be appended to the email body. Example: "Go to http://mysite.com.com/admin to view submissions"
EmailStyle*CSS to be used for HTML email
DateFormatformat to use for any date fields. The default is %a %e %B %Y (for valid format characters, please refer to http://php.net/manual/en/function.strftime.php)
SendToNalternative email addresses (more information below)

* The value for these keywords may be in the form file:pathname, in which case the contents of the specified file will be used as the value.

Example

[Email Options]

ToAddress   = owner@yourdomain.com
FromAddress = visitor@yourdomain.com
FromName    = Web visitor
Subject     = Message from your web site
EmailStyle  = body { font-family:Arial,Helvetica,sans-serif; font-size:small; color:#333366; } a { color:#aa5555; }

NOTE: You can bypass or replace the default email sent by twzContact by using a custom processing function.

Send to alternative email

Normally, the ToAddress setting is where the email is sent. However, it is possible to send it to one of several alternative addresses instead, using the fSendTo standard field. The destination address will depend on the value of the fSendTo field selected by the visitor.

For example, your contact form might have a field called "Subject" which is a drop-down list. Depending on which subject the visitor selects, the email will be sent to one of several people. To demonstrate, refer to this extract of a settings file:

[Email options]

ToAddress   = owner@example.com.au
SendTo1     = person_A@example.com.au
SendTo2     = person_B@example.com.au
SendTo3     = person_C@example.com.au

[Fields]

subject       = select

[Field Options]

subject       = 1=Web site,2=Advertising,3=Other stuff

[Standard fields]

fSendTo     = subject

In the example above,

I can understand this perfectly - can you?!!? ;-)