|
Posted by Gilles Ganault on 01/18/08 04:02
On Thu, 17 Jan 2008 20:03:32 -0500, Jerry Stuckle
<jstucklex@attglobal.net> wrote:
>Why on earth would you need the address of their SMTP server?
Because it was easier to suck connect to their SMTP server with the
MSWinsock control and send a few lines of code, than it is to format
data and send them to a remote PHP script with the POST method.
> Even if you had it, you wouldn't be able to send a message through it if it were
>correctly configured.
Why not? I've already done it before.
>But if you want form mail, why not just do it all in VBScript. That's
>what I do in the couple of ASP sites I have.
I don't want to use VBScript.
For those interested, here's some code I found that seems to do the
job:
=================
<?php
foreach ($_POST as $k => $v) {
if(!isset($_POST[$k]) || !strlen($_POST[$k])) {
echo "$k not set!<p>";
exit;
}
}
$fp = fopen ("stuff_received.txt", "w");
fputs ($fp,$_POST['etab']);
fputs ($fp,$_POST['sujet']);
fputs ($fp,$_POST['message']);
fclose($fp);
?>
=================
[Back to original message]
|