############################################################### # This program uses blat.exe to send a to a list of addresses # # And returns a confirmation HTML page # # Greg Elin 2.2.97 # # # ############################################################### # Program variable explanation ################################ # $recipients = list of email address to send message; # $ccaddress = carbon copy address; # $knownsender = a 'From' address; # $fromsender = from sender known to STMP server; # $subject = subject line of message; # $message = name of message file to send; # $blatpath = full path name to execute blat; # $server = server name if different than installed one; # Define variables ########################################### $recipients = "name1\@company1.com, name2\@company2.com, name3\@company3.com"; $ccaddress = "foo\@bar.com"; $knownsender = "foo\@bar.com"; $fromsender = "foo\@bar.com"; $subject = "sending testblat.txt"; $message = "testblat.txt "; $blatpath = "blat.exe "; # $server = "pop.bar.com"; # print an html-complient execution confirmation page ######## print "Content-Type: text/html\n\n"; # add header for HTML document print "\n"; print "
\n"; print "To\: $recipients \n"; print "Subject\: $subject \n"; print "File\: $message \n"; # print "Server\: $server \n"; print "
\n"; print "
\n"; # Get message ready ############################################### $commandline = $blatpath; $commandline .= $message; $commandline .= "-s \"$subject\" " if $subject; $commandline .= "-t \"$recipients\" " if $recipients; $commandline .= "-f $fromsender " if $fromsender; $commandline .= "-c $ccaddress " if $ccaddress; # $commandline .= "-server $server " if $server; print "\$commandline \= $commandline"; print "
\n"; print "
\n"; print "
\n"; # Send mail using blat and the system command ############ system($commandline); print "
\n"; print "
\n"; print "Blat has been executed.
\n"; # Finish printing html-complient execution confirmation page ###### print "
\n"; print "
\n"; print "
\n"; print "\n"; print "\n";