The classic email sending library for PHP
This report summarizes scanner evidence for PHPMailer/PHPMailer, a PHP project with 22,310 GitHub stars. SynthScan examined 22,195 lines of code across 155 source files, recording 215 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 11.1 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 90 finding(s).
Are imports declared and package/API names verified? 125 finding(s).
Are wrappers, guards, and repeated structures necessary? 81 finding(s).
Which changes need focused human review? 215 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 215 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 111 | $mail->Username = 'user@example.com'; //SMTP username | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 124 | * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunit | COMMENT |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 131 | $sender = 'rpath@example.org'; | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 154 | * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunit | COMMENT |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 161 | $sender = 'rpath@example.org'; | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 232 | 'rpath@example.org' | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 237 | 'rpath@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 240 | '/opt/sendmail -x -y -fuser@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 242 | 'user@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 245 | '/opt/sendmail -X /path/to/logfile -fuser@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 247 | 'user@example.org', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 55 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 55 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 56 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 56 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 60 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 60 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 61 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 61 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 65 | 'message' => 'Lorem ipsum dolor' . PHPMailer::CRLF, | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 66 | 'expected' => 'Lorem ipsum dolor' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 69 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 69 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 72 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 72 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 80 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 80 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 83 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 83 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 91 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLF | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 91 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLF | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 95 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 95 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 104 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 110 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 111 | 'expected' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrs=' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 116 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiam=' . PHPMailer::CRLF | CODE |
| LOW | test/PHPMailer/EmptyMailerTest.php | 33 | $this->Mail->addAddress('whoto@example.com', 'John Doe'); | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 122 | 'first@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 123 | 'first.last@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 124 | '1234567890123456789012345678901234567890123456789012345678901234@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 125 | '"first\"last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 126 | '"first@last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 127 | '"first\last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 131 | '"first\last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 132 | '"Abc\@def"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 133 | '"Fred\ Bloggs"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 134 | '"Joe.\Blow"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 135 | '"Abc@def"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 136 | 'user+mailbox@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 137 | 'customer/department=shipping@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 138 | '$A12345@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 139 | '!def!xyz%abc@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 140 | '_somename@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 142 | 'peter.piper@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 143 | 'test@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 144 | 'TEST@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 145 | '1234567890@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 146 | 'test+test@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 147 | 'test-test@example.org', | CODE |
| 65 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/PHPMailer/AddStringEmbeddedImageTest.php | 32 | public function testHtmlStringEmbedNoName() | CODE |
| LOW | test/PHPMailer/AddStringEmbeddedImageTest.php | 130 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/FileIsAccessibleTest.php | 82 | public function testFileIsAccessibleFailsOnUnreadableFile() | CODE |
| LOW | test/PHPMailer/AddStringAttachmentTest.php | 33 | public function testAddPlainStringAttachment() | CODE |
| LOW | test/PHPMailer/AddStringAttachmentTest.php | 118 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 37 | public function testAddAndGetCustomHeader($headers, $expected = null) | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 67 | public static function dataAddAndGetCustomHeader() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 163 | public function testAddCustomHeaderInvalid($name, $value = null) | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 173 | public static function dataAddCustomHeaderInvalid() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 217 | public function testClearCustomHeaderValue() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 259 | public function testInvalidHeaderException() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 94 | public function testConfigureSmtpWithoutAuthentication() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 108 | public function testConfigureSmtpWithAuthentication() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 125 | public function testConfigureSmtpWithoutPort() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 153 | public function testConfigureSmtpsWithoutPort() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 173 | public function testConfigureWithUnknownOption() | CODE |
| LOW | test/PHPMailer/NormalizeBreaksTest.php | 94 | public function testNormalizeBreaksWithCustomLineEnding() | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 129 | public function testMailSendWithSendmailParams() | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 159 | public function testSendmailSendWithSendmailParams() | CODE |
| LOW | test/PHPMailer/DKIMWithoutExceptionsTest.php | 37 | public function testDKIMSignOpenSSLNotAvailable() | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 38 | public function testPunyencodeAddressConversion($input, $charset, $expected) | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 54 | public static function dataPunyencodeAddressConversion() | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 92 | public function testPunyencodeAddressNoConversion($input, $charset, $expected) | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 111 | public static function dataPunyencodeAddressNoConversion() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 106 | public function testSetFromDoesNotOverruleSenderWithAutoFalse() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 117 | public function testSetFromDoesNotOverruleExistingSender() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 159 | public function testInvalidAddressException($address, $name = '') | CODE |
| LOW | test/PHPMailer/EmptyMailerTest.php | 30 | public function testSendWithEmptyMailerDoesNotCrash($mailer) | CODE |
| LOW | test/PHPMailer/ValidateAddressTest.php | 73 | public function testPatternsInvalidAddress($pattern) | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 45 | public function testMultiplePlainFileAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 69 | public function testRejectNonLocalFileAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 622 | public function testEmbeddedImageCustomCidDomain() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 862 | public function testAddAttachmentEncodingException() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 873 | public function testAddFolderAsAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 887 | public function testDeletedAttachmentException() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 902 | public function testDeletedAttachmentError() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 1272 | public function testStrangeUnicodeEmailAddresses() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 1285 | public function testAutomaticEaiValidation() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 54 | public function testDKIMBodyCanonicalization() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 89 | public function testDKIMHeaderCanonicalization() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 126 | public function testDKIMOptionalHeaderFieldsCopy() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 247 | public function testDKIMSignOpenSSLNotAvailableException() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 40 | public function testAddReplyToValidAddressNonIdn($address, $name = null, $expected = null) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 86 | public static function dataAddReplyToValidAddressNonIdn() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 125 | public function testAddReplyToInvalidAddressNonIdn($address) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 147 | public function testAddReplyToInvalidAddressNonIdnException($address) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 161 | public static function dataAddReplyToInvalidAddressNonIdn() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 181 | public function testReplyToInMessageHeader($addresses, $expected) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 207 | public static function dataReplyToInMessageHeader() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 265 | public function testEnqueueAndAddIdnAddress() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 305 | public function testNoDuplicateReplyToAddresses() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 134 | public function testSetLanguageSuccessFallBackLogic($phrase, $langCode = null, $langPath = null) | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 144 | public static function dataSetLanguageSuccessFallBackLogic() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 282 | public function testSetLanguageDoesNotExecuteCodeInLangFile() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 327 | public function testSetLanguageDoesNotExecuteCodeWithBackticksInLangFile() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 358 | public function testSetLanguageOnlyProcessesKnownKeys() | CODE |
| LOW | test/PHPMailer/AddEmbeddedImageTest.php | 99 | public function testAddingImageWithoutExplicitName() | CODE |
| LOW | test/PHPMailer/AddEmbeddedImageTest.php | 142 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/ParseAddressesTest.php | 53 | public function testAddressSplittingNative($addrstr, $expected, $charset = PHPMailer::CHARSET_ISO88591) | CODE |
| LOW | test/PHPMailer/ParseAddressesTest.php | 80 | public function testParseAddressesWithFalsyUseimapValues($useimap) | CODE |
| 21 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .phan/config.php | 21 | ], | COMMENT |
| LOW | test/fakepopserver.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | test/PHPMailer/PHPMailerTest.php | 1381 | $this->Mail->SMTPDebug = SMTP::DEBUG_LOWLEVEL; //Show connection-level errors | COMMENT |
| LOW | language/phpmailer.lang-fo.php | 21 | $PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; | COMMENT |
| LOW | language/phpmailer.lang-fi.php | 21 | $PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.'; | COMMENT |
| LOW | .github/workflows/tests.yml | 141 | permissions: | COMMENT |
| LOW | src/PHPMailer.php | 1901 | //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver | COMMENT |
| LOW | src/PHPMailer.php | 5281 | //That means this may break if you do something daft like put vertical tabs in your headers. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/fakesendmail.sh | 5 | #Create a temp folder to put messages in | COMMENT |