ID:               14981
 Comment by:       keyserj at hotmail dot com
 Reported By:      andrew at digitalhands dot co dot uk
 Status:           Bogus
 Bug Type:         Mail related
 Operating System: Unix
 PHP Version:      4.1.0
 New Comment:

I was having problems with the mail() function also. Sometimes it send
the mail and it never arrives. I never get the error message. This is
my code:

<?
$e=$_POST["email"];
$b=$_POST["name"];
$p="random pass";
$asunto="Welcome to this site ";
$cuerpo="Welcome ".$b." \n Your password for the account ".$e." is:
".$p;
$cuerpo .="\n To active this account:
http://somesite.some/activar.php?acount=".$e;           
if (mail($e,$asunto,$cuerpo)){
echo "Welcome ";
echo "$b";
echo "! your acount password was sent to $e<br>";
echo "Thanks!<br>";
echo "<a href='in.php'> Login </a>";}else{
echo "we have problems sending the mail";}
?>

Pacho


Previous Comments:
------------------------------------------------------------------------

[2002-01-11 08:55:34] [EMAIL PROTECTED]

it doesn't have to touch the '-' and it wont
none of the characters allowed in the domain part
of an email address needs quoting

for the windows implementation of mail() 
further investigation could be necessary
but the unix mail() implementation is so
straight forward that i'm really sure it
is not PHPs fault here 

if every domain with a '-' in it fails 
  -> blame your ISPs mail setup

if only certain domains fail
  -> maybe the mail server on that domain
     doesn't play well with the one your
     ISP uses

investigating the DNS MX entries for
the-total-solution.com you can see
that this domain has only *one* mail 
server, no fallback system, and the
mail server identifies itself as
"220 MAIL.the-total-solution.com NTMail"

not to unlikely that you have delivery
problems with that domain :(


------------------------------------------------------------------------

[2002-01-11 08:20:03] andrew at digitalhands dot co dot uk

It's wrong to write this off as Bogus prematurely. It could still be
the case that PHP has a problem with passing the correct information to
sendmail. It may be that PHP needs to internally perform some kind of
replacement on email addresses containing '-' characters (etc?) with
escape characters. Perhaps when the sendmail gets the information from
PHP, the email address is in an unacceptable format. Who knows? I've
asked for diagnostics to be done on the mail server in question.

------------------------------------------------------------------------

[2002-01-11 08:00:54] [EMAIL PROTECTED]

then it's the mail server on that system that
doesn't get it, mail() on unix just puts together
a message from the paramters you gave it without
further processing and passes it transparently
to the sendmail command

please contact your ISP for further investigation

------------------------------------------------------------------------

[2002-01-11 07:08:04] andrew at digitalhands dot co dot uk

I'm not running it, my ISP is. Anyway, excuse the error, it's on unix.

------------------------------------------------------------------------

[2002-01-11 05:51:44] [EMAIL PROTECTED]

there finaly is an Apache OS now? great ;)

no, serious, what kind of operating system
are you runnig this on, windows or *nix?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/14981

-- 
Edit this bug report at http://bugs.php.net/?id=14981&edit=1

Reply via email to