ID:               18798
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
-Bug Type:         Mail related
+Bug Type:         Documentation problem
 Operating System: Windows 2k Server SP2
 PHP Version:      4.3.0-dev
 New Comment:

This is a limitation of the mail() command. Adresses in the form of
"Something <[EMAIL PROTECTED]>" are NOT support by the mail()
command.

The technical issue is that mail() does not parsing and while tlaking
to the MTA it simple puts the email addresse in '<' and '>' brackets
which will then look something like

"<Karel <[EMAIL PROTECTED]>>"

which of course doesn't work.

You have a two options to me knowledge:
1) trim down the $to field to the [EMAIL PROTECTED] part and use the From:
custom header
2) Try if the imap_mail() command works for you, afaik it does email
address parsing.

Reclassifying as documentation problem for mail() on win32. The page
should also mention imap_mail().


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

[2002-08-08 08:33:11] [EMAIL PROTECTED]

The problem remains I installed the latest snap:
- php4-win32-latest.zip - 08-Aug-2002 03:26 5.3M

If you like I can give you ftp-access to the server.
Then you can try the mail routine yourself.

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

[2002-08-08 08:25:40] [EMAIL PROTECTED]

Sorry, should have said that earlier: please try a _non_ STABLE
snapshot.

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

[2002-08-08 08:05:11] [EMAIL PROTECTED]

I installed the snap (php4-win32-STABLE-latest.zip - 08-Aug-2002 01:23
4.6M), but the problem remain.

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

[2002-08-08 06:15:01] [EMAIL PROTECTED]

Can you test the latest snapshot from http://snaps.php.net, this might
have been fixed.

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

[2002-08-08 04:06:55] [EMAIL PROTECTED]

If I send an email with the folowing routine I receive the mail.
<?
$to  = "[EMAIL PROTECTED]";
mail($to, "subject", "message");
?>
OR
<?
$to  = "[EMAIL PROTECTED]" . ", ";
$to .= "[EMAIL PROTECTED]";
mail($to, "subject", "message");
?>

But If I change the $to varible I don't receive the message.
<?
$to  = "Karel <[EMAIL PROTECTED]>";
mail($to, "subject", "message");
?>

The same problem occures when I send a message to:
<?
$to  = "Karel <[EMAIL PROTECTED]>" . ", ";
$to .= "webmaster <[EMAIL PROTECTED]>";
mail($to, "subject", "message");
?>

Is this a problem coused by the mailsoftware (Merak mailserver -
http://www.merakmail.com) or is it a php-problem?

Kind regards,
Karel Mertens

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


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


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

Reply via email to