Bug #80751 [NEW]: Comma in recipient name breaks email delivery
| From: | camaro396 at yandex dot ru | Date: | Sun, 14 Feb 2021 15:10:01 +0000 |
| Subject: | Bug #80751 [NEW]: Comma in recipient name breaks email delivery | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-232157@lists.php.net to get a copy of this message | ||
From: camaro396 at yandex dot ru
Operating system: Windows Server 2012 R2
PHP version: 7.4.15
Package: Mail related
Bug Type: Bug
Bug description:Comma in recipient name breaks email delivery
Description:
------------
Comma in recipient name leads to a malformed SMTP FROM command.
Test script:
---------------
mail('"Lastname, firstname" <lastname_firstname@example.com>',
'TEST',
'TEST', 'From: "Test" <test@example.com>');
Expected result:
----------------
Message sent successfully
Actual result:
--------------
Message not sent.
SMTP transcript looks like this
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "SENT: 220
mx.example.com"
"SMTPD" 56232 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "RECEIVED:
HELO HOSTNAME"
"SMTPD" 56232 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "SENT: 250
Hello."
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "RECEIVED:
MAIL FROM:<sender@example.com>"
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "SENT: 250
OK"
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "RECEIVED:
RCPT TO:<"Lastname>"
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "SENT: 550
A valid address is required."
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "RECEIVED:
QUIT"
"SMTPD" 55224 293364 "2021-02-04
05:34:12.678" "xx.xx.xx.xx" "SENT: 221
goodbye"
--
Edit bug report at https://bugs.php.net/bug.php?id=80751&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80751&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80751&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80751&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80751&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80751&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80751&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80751&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80751&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80751&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80751&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80751&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80751&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80751&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80751&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80751&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80751&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80751&r=mysqlcfg