Postmail is intended to be called from CGI scripts, batch files or run from the command line. If you want a simple method to return information to you from a form without the use of scripts, please use wsendmail.exe.

 

How to use postmail.exe on SurfnetUSA
Postmail is intended to be called from CGI scripts. If you do not have CGI capability, see the Services and Pricing page for more information. The postmail program can be called from a batch file or perl script. Here are the basics:

USAGE: postmail [-S subject line] [-H smart host] [-f sender address]
                [-F full name] [-t] [-v] [-?] [recipient list] [ 
          

How to Use postmail.exe

Postmail is intended to be used from a script or batch file. Here is a very simple perl script which calls postmail to send a message:

[start of script]

#!/usr/bin/perl

$MAILER = 'postmail -t';
$to     = 'rfbreedlov@jps.net';
$from   = 'bob@surfnetusa.com';

open(OUT,"|$MAILER");

print OUT <<End_of_message;
To: $to
From: $from
Subject: Test Message from perl

This is a test message from a perl program.
It could easily be a message from a script.

End_of_message
	;

# close(OUT);

[end of script]

Other scripts are possible and the program can be called from a batch file. In general, postmail can be called whereever the Unix sendmail program is used. There are differences in the syntax, however. Be sure to check your scripts before using this program.

 

SurfnetUSA CGI Page   

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

© Copyright 1997 by SurfnetUSA. All rights reserved.