|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29933 Certain subject Line characters cause mail() to fail
Submitted: 2004-09-01 18:50 UTC Modified: 2004-09-02 08:13 UTC
From: b dot parish at arts dot ac dot uk Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.8 OS: Windows 2000 SP 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 26 = ?
Subscribe to this entry?

 [2004-09-01 18:50 UTC] b dot parish at arts dot ac dot uk
The mail function cannot send the email has certain characters. For instance the following will not work

$subject = "Joe bloggs edited the Personnel Record of Joe bloggs";

If I strip out the 'd's, it does work:

$subject = "Joe bloggs edite the Personnel Recor of Joe bloggs";

mail("", $subject, "test", "");

My php.ini has the following values:

[mail function]
; For Win32 only.

; For Win32 only.
sendmail_from =

The problem also occurs on Linux running PHP Version 4.3.2

Looking in /var/log/maillog:

Sep  1 17:41:57 www-b sendmail[27241]: i81GfvD27241: from=nobody, size=92, class=0, nrcpts=1, msgid=<>, relay=nobody@localhost
Sep  1 17:41:57 www-b sendmail[27244]: i81GfvD27241:, ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30092, [], dsn=2.0.0, stat=Sent (OK id=1C2YBJ-0002Nd-00)

Reproduce code:
$subject = "Joe bloggs edited the Personnel Record of Joe bloggs";

mail("", $subject, "test", "");

Expected result:
An email is sent with:


subject: 'Joe bloggs edited the Personnel Record of Joe bloggs'

body: 'test'

Actual result:
No email is sent at all.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-01 19:11 UTC] b dot parish at arts dot ac dot uk
I am investigating the possibility that it is a problem with our mail relay software.

The problem can be replicated using a standard email client and therefore it is very unlikely to be PHP related.

I will report back once we have done more diagnostics.
 [2004-09-02 08:13 UTC]
As PHP doesn't mangle addresses anyway, I don't believe this can't be a bug in PHP and such I'm marking it as bogus. Of your little investigation brings any new evidence, feel free to reopen.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 19:03:41 2023 UTC