Surfnet GCI: wsendmail.exe

wsendmail.exe allows users to send formatted mail messages from forms. It operates either as a FORM action or can be called from another CGI script.

 

How to use wsendmail.exe on SurfnetUSA
You must be a member of SurfnetUSA!

  1. If you have not already done so, request a wsendmail alias using the form below.
  2. Once you have received confirmation that your alias has been established, follow the directions to use wsendmail.exe on your form or CGI script.
  3. To use wsendmail.exe from your form, make it your action:
    <FORM ACTION="http://www.surfnetusa.com/cgi-bin/wsendmail.exe" METHOD="post">

wsendmail alias request

You may request more than one alias for different E-mail addresses. Submit a separate form for each request.

SurfnetUSA Login:
E-mail Address:
Comment (optional):

(This form uses wsendmail.exe. View the source in your browser for an example of how to use wsendmail.exe)

How to Use wsendmail.exe

Below is the syntax if you use the program from a CGI script or the DOS command line:

wSendmail [-debug] [-verbose] [-CGI] [-mime] [-sSubject] [-fFrom] {to[,to] | @addr_list_file} mail_file
wSendmail [-debug] [-verbose] [-CGI] [-mime] [-sSubject] [-fFrom] {to[,to] | @addr_list_file} < message

Example:

        wSendmail -v "-sTest message" -fme@somewhere.com someone@somewhere.com

(Since no mail_file is given, you must pipe in the message from your script.)

Line parameters are not used when running as CGI-BIN app.

The parameters in is square brackets are optional.

  • debug enables logging of the mail transaction.
  • verbose enables logging of the result of the transaction
  • s specifies the subject of the message.
  • f identifies the sender of the mail.
  • mime disables mime encoding
  • CGI disables standard CGI processing

If used as a CGI-BIN app, the following fields are required:

from
senders email address (will map to "surfnet@surfnetusa" if not filled in)
RCPT
Receiver of the email. There can me any number of receivers. This field will typically be hidden. The data value of this field is a nickname defined in the wsendmail.ini file in your windows directory. This way mail can only be sent to mailboxes authorized by you.
subject
The subject field in the email. Typically used to identify the page HTTP that generated the email.

Any other form fields will be included in the message body with the filed name as a header, and the contents following on the next line. This version supports a total of 500 fields.

Note that the filed labels are case sensitive.

The program supports mime 1.0 encoding of European national characters.

It also applies to the RFC 821 and RFC 822 specs.33999

In CGI-BIN mode the program supports any number of recipients. In command line mode you can specify multiple recipients by separating them with comma (jgaa@online.no,whoever@somewhere.com) or by replacing the to parameter with a "@filename". The @ tells wSendmail that the recipients are in the filename. The recipients file is a standard ASCII file with one email address on each line.

The program will automatically detect if it is started by a HTTP server as a CGI-BIN app, and output a confirmation page in standard HTML 1 format. The HTML code is defined in the "wSendmail.ini" file and is standard for the SurfnetUSA.

 

SurfnetUSA CGI Page   

Email: surfnet@surfnetusa.com
Phone: 408.430-0347 | Fax: 408.430-0247

© Copyright 1997 by SurfnetUSA. All rights reserved.