8000 bug #34760 [Mailer] Fix SMTP Authentication when using STARTTLS (DjLe… · symfony/symfony@b4c8d51 · GitHub
[go: up one dir, main page]

Skip to content

Commit b4c8d51

Browse files
committed
bug #34760 [Mailer] Fix SMTP Authentication when using STARTTLS (DjLeChuck)
This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] Fix SMTP Authentication when using STARTTLS | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34522 | License | MIT When the mail server uses STARTTLS, the SMTP Authentication is not performed because the AUTH capabilities are not send during the first EHLO call, but during the second one. Example of problematic exchange solved by this PR: ``` < 220 mydomain.tld ESMTP Postcow > EHLO [127.0.0.1] < 250-mydomain.tld < 250-PIPELINING < 250-SIZE 104857600 < 250-ETRN < 250-STARTTLS < 250-ENHANCEDSTATUSCODES < 250-8BITMIME < 250-DSN < 250 CHUNKING > STARTTLS < 220 2.0.0 Ready to start TLS > EHLO [127.0.0.1] < 250-mydomain.tld < 250-PIPELINING < 250-SIZE 104857600 < 250-ETRN < 250-AUTH PLAIN LOGIN < 250-AUTH=PLAIN LOGIN < 250-ENHANCEDSTATUSCODES < 250-8BITMIME < 250-DSN < 250 CHUNKING > MAIL FROM:<noreply@XXX> < 250 2.1.0 Ok > RCPT TO:<XXX> < 554 5.7.1 <XXX>: Client host rejected: Access denied ``` Commits ------- 75b5454 [Mailer] Fix SMTP Authentication when using STARTTLS
2 parents 53f2878 + 75b5454 commit b4c8d51

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ protected function doHeloCommand(): void
115115

116116
try {
117117
$response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->getLocalDomain()), [250]);
118+
$capabilities = $this->getCapabilities($response);
118119
} catch (TransportExceptionInterface $e) {
119120
parent::doHeloCommand();
120121

0 commit comments

Comments
 (0)
0