HTML Form E-Mailer

This application is a generic HTML form E-mailer that will take the input submitted to it, combine it with a specified html page, and E-mail the results to the given recipients. To allow for users with both advanced and primitive mail clients, the results can be sent as either text or html. Control of how the application works is described by the html 'form' (as in <form>) fields passed to it. Only 2 fields, "mailto" and "replyto", representing the recipient and sender respectively, are required. All other fields are optional. Many have defaults.

It is fairly important to recognize the process of creating the message to send to the user to fully exploit this application. The message is created by two pieces. The first piece is an html page, referred to as the html source page. The second piece is the form field data. These form fields are the data the user entered before hitting the submit button. The html source page does not have to be the same page that the user entered their data on. Therefore we can present one view to the user with clear instructions and lengthy detail and another completely different view with different instructions or formatting for the recipients. As long as the form field names match up (case sensitive) from one html page to the next, the data will make the transition.

Many of the form fields below can be used to customize the answer page presented to the html page user after sending the form. The default consists of a generic reply and a link to return the user to UD's home page.

The best way to learn to use this application is through the tutorial.
Also available is an HTML form bouncer.

HTML Command Form Fields
All command form fields listed below, except "X-Mailto-" are case insensitive. So "SuBJeCt" and "subject" are the same field to the purposes of this application.
The form fields can be broken into three sections

  1. those that deal with configuring the email,
  2. those that deal with configuring the reply html page,
  3. and those that specify how the data will be retrieved and handled by the application.

Email Configuration
Field Name Required Default Value Possible Values Short Description
mailto Yes None Valid e-mail address* Form recipient
replyto Yes None Valid e-mail address* Form sender
carbon_replyto No 'no' 'yes' or 'no' Have a carbon copy sent to the 'replyto' field
cc or cc[1-10] No None Valid e-mail address* Carbon copy recipient(s)
bcc or bcc[1-10] No None Valid e-mail address* Blind carbon copy recipient(s)
subject No 'Routed html form' any short text message Subject line of E-mailed message
mailformat No 'text' 'text' or 'html' Format of mailed message, text or html
X-Mailto- No None rfc788 header text Embed informational headers in mail message
serverinfo No 'no' 'yes' or 'no' info for developers tacked onto end of email
*Email address verification: To avoid message loss due to typo's, all email addresses with host 'udel.edu' will be verified. Occasionally this verification can be wrong, in which case unverified users should contact System Security and Access at access@udel.edu with their name and email address. SSA will contact the user with further details.

Reply Configuration
Field Name Required Default Value Possible Values Short Description
reply No 'Thank You' escaped html text Text displayed upon successful completion of E-mail
returnpage No 'http://www.udel.edu/' URL or escaped html text Suppressed answer -> URL
otherwise -> html to display
suppress No None any combination of
a) 'answer'
b) 'returnpage'
c) 'mailto'
Suppress (format) the reply sent to the submitter

Misc Configuration
Field Name Required Default Value Possible Values Short Description
html_source Yes Refering URL fully qualified URL URL of the html source page to be used
allow_defaults or
only_sub_if_passed
No 'no' 'y'/'yes' or 'no' If a different source page is used, this will allow default values on that page to come through
dont_email No 'no' 'yes' or 'no' For use while testing the reply. If 'yes' no emails will be sent.

Mailto field
This field specifies the form recipient
Corrosponds to the 'To:' field of an email.
e.g. <input type=hidden name="mailto" value="joeuser@udel.edu">

Replyto field
The sender of the message, sometimes a hidden field, but most of the time will be input by the user of the page.
Corrosponds to the 'From:' field of an email.
e.g. <input type=hidden name="replyto" value="janeuser@udel.edu">

Carbon replyto field
If 'yes', will send a carbon copy of the message to the email address in the replyto field.
This would be a good choice for a checkbox or radio button to let the user specify if they want to be carboned or not.
e.g. <input type=hidden name="carbon_replyto" value="yes">

CC field(s)
This field takes advantage of the carbon copy (Cc:) feature available in the sendmail protocol (rfc788). 'cc1' through 'cc10', as well as any number of 'cc' fields are available for sending carbon copies.
e.g. <input type=hidden name="cc1" value="hector@udel.edu">
e.g. <input type=hidden name="cc2" value="someuser@udel.edu">
e.g. <input type=hidden name="cc3" value="person@udel.edu">
e.g. <input type=hidden name="cc" value="janedoe@udel.edu">
e.g. <input type=hidden name="cc" value="johndoe@udel.edu">

BCC field(s)
This field takes advantage of the blind carbon copy (Bcc:) feature available in the sendmail protocol (rfc788). 'bcc1' through 'bcc10', as well as any number of 'bcc' fields are available for sending blind carbon copies.
e.g. <input type=hidden name="bcc1" value="hector@udel.edu">
e.g. <input type=hidden name="bcc2" value="someuser@udel.edu">
e.g. <input type=hidden name="bcc3" value="person@udel.edu">
e.g. <input type=hidden name="bcc" value="janedoe@udel.edu">
e.g. <input type=hidden name="bcc" value="johndoe@udel.edu">

Subject field
The subject of a mailed message.
Corrosponds to the 'Subject:' field of an email.
e.g. <input type=hidden name="subject" value="some request">

Mailformat field
Specifies if a form is to be returned as an html file or as a plain text file. Defaults to text.
text -> return as text
html -> return as html
e.g. <input type=hidden name="mailformat" value="html">

X-Mailto- field(s)
Any field name beginning with "X-Mailto-" will be passed as a header to the sendmail program. These fields will be listed below "Subject:", "From:", "To:", etc. in the resulting mail message. The value for this field must be text that won't goof up sendmail (see rfc788).
The prefix "X-Mailto-" is the only case sensitive field(s).
e.g. <input type=hidden name="X-Mailto-Message" value="hi bob">

Serverinfo field
Including this field with a value of 'yes' will result in some server information useful to a developer being attached to the bottom of the mail message.
e.g. <input type=hidden name="serverinfo" value="yes">

Reply field
Text/html reply to display on the user's web browser.
Can be suppressed.
e.g. <input type=hidden name="reply" value="&lt;h2&gt;Thank you, your form has been sent.&lt;/h2&gt;">

Returnpage field
If 'answer' is suppressed, will bring up the 'returnpage' in the users browser. Otherwise will just display the text.
e.g. <input type=hidden name="returnpage" value="http://www.udel.edu/">
e.g. <input type=hidden name="returnpage" value="University of Delaware's &lt;a href=&quot;http://www.udel.edu/&quot;&gt;Homepage&lt;/a&gt;>

Suppress field
After a form has been submitted, the program will by default display an acknowledgement. 'Suppress' can be used to format this acknowledgement.
The suppress field may either be left off, have the value of "mailto" and/or "returnpage" or have the value "answer". If "answer" is used, the returnpage value must only contain a URL and not additional HTML. This flag suppresses the answer HTML page and goes directly to the HTML page defined by returnpage.

mailto -> suppresses displaying the 'Your form has been sent to (mailto field)' message
returnpage -> suppresses displaying the returnpage field.
answer -> takes the user to the link supplied by the returnpage field.
e.g. <input type=hidden name="suppress" value="returnpage mailto">
e.g. <input type=hidden name="suppress" value="answer">

Html source field
The purpose of the application is to merge data input by a user on an html form with an html source page and E-mail the results to the specified individual(s).
This field specifies the html source page.
Any html page may be substituted in place of the original html page with the html_source field. All data of form fields (input, select, textarea, file uploads) with matching names (name="yatta") will be included.
e.g. <input type=hidden name="html_source" value="http://chico.nss.udel.edu/mailto/mailto_test.html">

Allow defaults (aka only_sub_if_passed) field
If this field is anything but 'no', the application will only replace/modify html fields if the corrosponding field has been submitted by the user. Thus default values on a different source file can pass through.
e.g. <input type=hidden name="allow_defaults" value="y">
e.g. <input type=hidden name="only_sub_if_passed" value="y">

Dont Email field
If this field is 'yes', the application will not send any emails. This is primarily used by programmers debugging the application and for testing the reply functionality. Note: the mailto and replyto fields will not be required and no email addresses will be verified.
e.g. <input type=hidden name="dont_email" value="yes">