quietone has asked for the wisdom of the Perl Monks concerning the following question:
sub display_sendemail { #use Win32::ODBC; $DSN="test"; $fromsender="someone\@somewhere.com"; $subject="Data"; $CustomerNumber = param("CustomerNumber"); $Name = param("Name"); $Address1 = param("Address1"); $City = param("City"); $State = param("State"); $ZipCode = param("ZipCode"); $Email = param("Email"); $server="server.name.net"; $recipient="someoneelse\@somewhereelse.com"; $message="$CustomerNumber.$Name.$Address1.$City.$State.$ZipCode.$Email +"; ## NO CONFIGURATION IS NECESSARY FROM HERE DOWN $blatpath="blat.exe "; $commandline = $blatpath; $commandline .= $message; $commandline .= "-q "; $commandline .= "-s \"$subject\" " if $subject; $commandline .= "-f $fromsender " if $fromsender; $commandline .= "-server $server " if $server; $commandline .= "-b $bccaddress " if $bccaddress; $db = new Win32::ODBC("DSN=$DSN;"); $commandline .= "-t \"$recipient\" "; system($commandline); #display results on screen print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>Account Information</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "<font face=arial>"; print "<b>Customer Number: </b>" . $CustomerNumber . "<br><br>\n"; print $Name . "<br>\n"; print $Address1 . "<br>\n"; print $City.","." ". $State . " ". $ZipCode . "<br><br +>\n"; print "<b>Email: </b>" . $Email . "\n"; print "<br>\n"; $db->Close(); print "</BODY>\n"; print "</HTML>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: blat problems
by lachoy (Parson) on Apr 20, 2001 at 01:43 UTC | |
|
Re: blat problems
by eejack (Hermit) on Apr 20, 2001 at 05:17 UTC |