><?
>$MailToAddress = "[EMAIL PROTECTED]";
>$MailSubject = "Group volunteer  list";
>    if (!$MailFromAddress) {

This should probably be:

if (!isset($MailFromAddress) || !$MailFromAddress)){

Hard to tell if this is cut out from a bigger script or what...

You also have a very unusual (but at least consistent) indenting style for {
and }...

>    $MailFromAddress = "$email";
>    }
>$Header = "";
>$Footer = "";
>?>
>   
> 
> <?
>    if (!is_array($HTTP_POST_VARS))
>    return;

You may want to use isset() first here as well, and to check for the new
$_POST array.

>reset($HTTP_POST_VARS);
>    while(list($key, $val) = each($HTTP_POST_VARS)) {
>    $GLOBALS[$key] = $val;

It would be better to use $$key = $val instead of stuffing things into
$GLOBALS.

Variable variables are a documented feature.  Assigning stuff into $GLOBALS
is not.
Don't think it will ever really break, but it's always safer to use
documented features.

>    $val=stripslashes($val);
>   
>    $Message .= "$key = $val\n";

To be strictly RFC-compliant, use \r\n, not just \n

>    }
> 
>    if ($Header) {
>    $Message = $Header."\n\n".$Message;
>    }
> 
>    if ($Footer) {
>    $Message .= "\n\n".$Footer;
>    }
> 
>mail( "$MailToAddress", "$MailSubject", "$Message", "From:
>$MailFromAddress");

The quotes on the first three arguments are silly -- not harmful, just
silly.  You're forcing PHP to create another string to hold the strings you
already have.  A trifle wasteful, I suppose, but mostly just silly.

Also use Reply-to: as well as From: if you want maximum number of email
clients to do the right thing.

You should be getting and checking the return value of the mail() function:

$success = mail($MailToAddress, $MailSubject, $Message, "From:
$MailFromAddress\r\nReply-to: $MailFromAddress);
if ($success){
  echo "Mail successfully queued.<BR>\n";
}
else{
  echo "Unable to queue email.<BR>\n";
}

This last part may not help you figure out *WHY* the email isn't arriving,
but you can at least pin-point the problem to either *BEFORE* PHP ever gets
the email shoved into sendmail's queue, or after sendmail got the email.

If this prints "Unable to queue email" you know PHP is not talking nice
enough to sendmail to get the email into sendmail's queue.  If it claims the
email was queued, you need to look at sendmail and see why it has decided
not to send the email after all.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to