How to create a mail-sending site:


Site Content:


Explanation of the steps to be processed:


Table with the list of form parameters processed by MailWebForm:

parameter name parameter value required example
provider <yourprovidername> yes <input type="hidden" name="provider" value="test">
fromName <entered by the user> no <input type="text" name="fromName">
fromEmail <entered by the user> yes <input type="text" name="fromEmail">
subject <entered by the user> no <input type="text" name="subject">
text <entered by the user> yes <textarea wrap="virtual" name="text"></textarea>


How to use a mail template:

MailWebForm is able to process template files to allow the provider to define the layout of the generated mails.

Notes:

Example of a simple mail template containing two optional parameters named info and address as well as the text entered by the user
Wants to receive additional information?      ${info}
Address of the sender:                        ${address}

Text entered by the sender:
---------------------------
${text}


Example of a configuration parameter file's content:

Notes:
# the URL that a client shall be redirected to in case of successful sending of the email
SUCCESS_URL=http://www.myserver.tld:8080/mysite/mail_sent_successfully.html

# the URL that a client shall be redirected to in case an error occurred during sending of the email
ERROR_URL=http://www.myserver.tld:8080/mysite/error_while_sending.html

# an optional name value (leading the to-address) that overrides the default value set by the system administrator.
TONAME=MailWebForm Test Account

# an optional address value that overrides the default to-address set by the system administrator.
TOADDRESS=test_account@mail_backup.mysecondserver.tld

# the value of the SMTP host to use; may be disallowed to overwrite by the system administrator
SMTP_HOST=mail_backup.mysecondserver.tld

# the value of the SMTP port to use (typically 25), but we use a proxy for this example; may be disallowed to
# overwrite by the system administrator
SMTP_PORT=2525

# the name of a mail template file that shall be processed (file name only, without path)
TEMPLATE=test.template