Skip to content

[Mailer] Handle failure when sending DATA #39597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 24, 2020

Conversation

jderusse
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

When an exception is thrown while sending an email via SMTP (ie. A attachment is not readable) the SMTP connection is left opened with a partial message sent.

This PR closes the connection (we can't abort after sending the DATA command) in such situation.

/cc @fabpot

@carsonbot carsonbot changed the title Handle failure when sending DATA [Mailer] Handle failure when sending DATA Dec 21, 2020
@nicolas-grekas
Copy link
Member

(there is a related test failure apparently)

@jderusse jderusse force-pushed the fix-invalid-message branch from 0c64ddb to 849211a Compare December 23, 2020 17:20
@jderusse
Copy link
Member Author

good catch @nicolas-grekas the exception message changed in Mime component in the last version.

Test fixed.

@jderusse jderusse merged commit 457c8b1 into symfony:4.4 Dec 24, 2020
@jderusse jderusse deleted the fix-invalid-message branch December 24, 2020 09:57
This was referenced Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants