Stdlib: mail() sendmail_path popen transport (#3285) - #21435
Merged
Merged
Conversation
Replace the always-false mail() stub with php-src php_mail()-shaped delivery via popen(sendmail_path), wire CLI/PHPT -d overrides for sendmail_path, and drop a duplicate CompilerVersionGateTest method that fatals PHPUnit on master. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mail()sendmail delivery in PHP (VmMail::send) matching php-srcext/standard/mail.cphp_mail():popen(sendmail_path), RFC822 To/Subject/headers/body on stdin, acceptEX_OK/EX_TEMPFAIL.bin/vm.php -d sendmail_path=…/ PHPT--INI--viaVmIni::applyStartupIniOverride→ mirrored INI override (same pattern as browscap)..phpt; keep “false when sendmail missing” registration case.testVmRegistersMbUcwordsOnForwardProfilethat fatals PHPUnit on master.php-src ref:
ext/standard/mail.c(PHP_FUNCTION(mail),php_mail).PHP impl:
ext/standard/VmMail.php,ext/standard/mail.php.Closes #3285
Batch next (claimed): #21432 headers array, #21433 mail.add_x_header, #21434 additional_params / force_extra_parameters.
Test plan
php bin/vm.php -d sendmail_path=…/mock_sendmail.sh test/repro/issue_3285_mail_sendmail.php→true/OKvendor/bin/phpunit test/compliance/VMTest.php --filter 'mail_sendmail_transport|mail_registered'→ OK (4)php script/bootstrap-inventory.php --check→OK 6163/6163Verification transcript
Made with Cursor