| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2001-06-01 19:21 UTC] olivier dot cahagne at epita dot fr
  [2001-06-22 18:28 UTC] hholzgra@php.net
  [2002-05-15 06:18 UTC] mfischer@php.net
  [2002-05-27 17:40 UTC] olivier dot cahagne at epita dot fr
  [2002-05-27 17:47 UTC] mfischer@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 03:00:01 2025 UTC | 
PHP 4.0.5 Platform: Win32 only. mail() -> SMTP bug. Sending a mail on Win32 platform with php.ini having set smtp_server correctly works fine. However, when setting an additional header like: "Reply-To: foo@isp.com\r\n" or "Errors-To: foo@isp.com\r\n" or even "Foo-To: foo@isp.com\r\n" will result in an e-mail not containing any To: field. I looked at win32/sendmail.c and saw these lines [...] if(!xheaders || !strstr(xheaders, "To:")){ p += sprintf(p, "To: %s\r\n', mailTo); [...] I believe it incorrectly recognize any "xxxxx-To:" Field and then messes the mail headers. This bug doesn't occur on Unix platforms using sendmail, postfix, etc. The SMTP server used here works fine if I use my own SMTP class. However, I believe this is a bug so it can be fixed by someone more knowledgable than me.