Re: Newbie getting close, form submission
| From: | Kondwani Spike Mkandawire | Date: | Mon, 22 Jul 2002 16:26:48 +0000 |
| Subject: | Re: Newbie getting close, form submission | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108887@lists.php.net to get a copy of this message | ||
Work by process of elimination... Here goes...
Start with testing whether your mail will actually send
the mail by executing a one line script... Just out of curiosity:
how come your host is running an old version of php...
Test the following:
<?php
( "mymail@something.com," "Testing", "Just a Test", "");
?>
if possible try and run it as a script by connecting to your
host via telnet or whatever (I am assuming the platform
is UNIX or Linux):
php MyMailScript
If you are using Linux or UNIX and this doesn't work then
there ought to be something wrong with the sendmail file...
If you are on a MS Windows platform then there ought to
be a problem in the ini file with the smtp setting...
If it sends then we can start sticking echo statements in
your script to see where the breakdown is...
Drop another line on the news group if you still need help,
I'll be behind this monitor for a while as will others I'm
sure...
Spike...
"Dean Ouellette" <dean@ouellette.ws> wrote in message
news:004d01c23185$a8822cb0$9c89adac@yoda...
> I am a complete newbie, search the web for examples right now and use
> them.
>
> The host has php 3.0
>
> Having problems with for submission
> Right now, no error messages, but does not actually send the email.
> Ideas?
>
> <?
> $MailToAddress = "email@myaddress.com";
>
> $MailSubject = "Get Involved List";
>
> if (!$MailFromAddress)
>
> {
> $MailFromAddress = "$email";
> }
>
> $Header = "";
> $Footer = "";
> ?>
>
> <?
>
> if (!is_array($HTTP_POST_VARS))
>
> return;
>
> reset($HTTP_POST_VARS);
>
> while(list($key, $val) = each($HTTP_POST_VARS))
>
> {
> $GLOBALS[$key] = $val;
>
> $val=stripslashes($val);
>
> $Message .= "$key = $val\n";
> }
>
> if ($Header)
> {
> $Message = $Header."\n\n".$Message;
> }
>
> if ($Footer)
>
> {
> $Message .= "\n\n".$Footer;
> }
>
> mail( "$MailToAddress", "$MailSubject", "$Message", "From:
> $MailFromAddress");
>
> ?>
>