UB Information Technology


How to Use Wings Mailer

Using the wingsmail program on the Central Campus Web Hosting Server, you can send form data from your HTML page to a number of e-mail addresses here at UB. This program is intended to be a replacement for the 'cgi-bin/email' program.

Instructions | Parameters and Settings | Hints | Sample Form

Instructions

Follow these steps to use wingsmail (these instructions assume you know how to create a form):

1. Create a form

 Your form should have the following action:
<form action="http://wings.buffalo.edu/cgi-bin/wingsmail" method="POST">

2. Specify hidden parameters

 The parameters that you can use are listed below.

3. Test!

 Submit your form and make sure you get the e-mail!

Parameters and Settings

The following parameters may be sent to the program as hidden form elements. The "to" field mandatory.

to

 the full address of the intended recipeint of the message; separate multiple addresses with a comma. Each address must be in the buffalo.edu domain.
 example: <input type=hidden name=to value="wings@buffalo.edu">
 example: <input type=hidden name=to value="wings@buffalo.edu,cit-listserv@buffalo.edu">

subject

 the subject of the message. It can be hidden, or from a form input box. This subject will be included in the header of the mail message.
 example: <input type=hidden name=subject value="Form Results">
 example: <input type=text name=subject>

source

 the name of your form page
 example: <input type=hidden name=source value="XYZ Department Comments Page">

source-url

 the full URL of your form page
 example: <input type=hidden name=source-url value="http://wings.buffalo.edu/academic/department/xyz/comments.html">

email

 who is the mail from? usually an input box.
 example: What's your email address? <input type=text name=email>

anon

 if you turn this on, the mail will be rejected if the user doesn't specify an email address.
 example: <input type=hidden name=anon value="yes">

return

 once the user fills out the form and the mail is sent, what page should they see next? USE THE FULL URL.
 example: <input type=hidden name=return value="http://wings.buffalo.edu/thanks.html">

thanks

 if you didn't set the 'return' variable above, what text do you want displayed upon form completion?
 example: <input type=hidden name=thanks value="Thank you for your comments! You're cool.">

fromaddress

 when email gets sent to you, and no 'email' field is set above, what address do you want the mail to come from?
 example: <input type=hidden name=fromaddress value="wings@buffalo.edu">

fromname

 used with 'fromaddress' above; what's the person's real name?
 example: <input type=hidden name=fromname value="Wings Webmaster">

reqfields

 don't send email if the user does not fill out certain fields; list, separated by the "|" symbol.
 example: <input type=hidden name=reqfields value="01. Name|02. Address">

sendhost

 Set sendhost to "no" in order to keep the sending host anonymous.
 example: <input type=hidden name=sendhost value="no">

return-path

 sets return-path field in email headers to direct bounces and failed emails to a specific address (default is wings@buffalo.edu).
 example: <input type=hidden name=return-path value="email@domain">

Hints

How can I specify the order of the results of my form fields?
 The fields are alphabetized in the email. In order to specify an order, you need to 'trick' the program by including numbers in the field names. If, for example, you have fields for 'Name', 'Address', and 'Phone', you need to name them as follows:
Name:     <input type=text name="01. Name">
Address:  <input type=text name="02. Address">
Phone:    <input type=text name="03. Phone">

Sample Form

This is the HTML for a sample form that asks for the name, email address, and subject, then mails the information and redirects the user to another page. The message is rejected if the name or email fields are blank.

<form action="http://wings.buffalo.edu/cgi-bin/wingsmail" method="POST">
<input type=hidden name="to" value="wings@buffalo.edu">
<input type=hidden name="subject" value="Testing the Sample Form!">
<input type=hidden name="source" value="wingsmail Instructions Page">
<input type=hidden name="source-url" value="http://wings.buffalo.edu/about/server/guide/wingsmail.html">
<input type=hidden name="return" value="http://wings.buffalo.edu/about/server/guide/testthanks.html">
<input type=hidden name="reqfields" value="01. Name|email">

<pre>
Name: <input type=text name="01. Name">
E-mail Address: <input type=text name="email">
Comment: <textarea name="02. Comment" rows=3 cols=40></textarea>
</pre>

<input type=submit value="Send Message">
</form>