Closed Thread Icon

Topic awaiting preservation: Using blat.exe to send email (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12485" title="Pages that link to Topic awaiting preservation: Using blat.exe to send email (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Using blat.exe to send email <span class="small">(Page 1 of 1)</span>\

 
olzn
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2002

posted posted 10-22-2002 18:31

I have a form and it passes two variables to a page called send.php.

The script works if I have no blankspaces in my text. But when i use blankspaces it sends blat.exe with no arguments.

<?

$subject = escapeshellcmd($_POST['subject']);
$text = escapeshellcmd($_POST['text']);

$blat = "blat.exe /log.txt -t olssone@tiscali.se -s ".$subject." -body ".$text;

$output = system("$blat");

echo nl2br($output);

?>

[This message has been edited by olzn (edited 10-22-2002).]

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-22-2002 19:47

You probably need quotes around the subject and text otherwise the spaces will screw up the command line argument parsing.

$blat = "blat.exe /log.txt -t olssone@tiscali.se -s \"".$subject." \" \"".". -body ".$text." \"";



.:[ Never resist a perfect moment ]:.

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 10-23-2002 17:43

is there a reason not to use php's mail() function? works fine for me... quick 'n' easy too

--Lurch--

olzn
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2002

posted posted 10-23-2002 20:09

I changed to the mail function when i got knowledge of it.

« BackwardsOnwards »

Show Forum Drop Down Menu