Skip to content
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

fix: close smtp connection after sending or on error #9561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Apr 12, 2024

Unfortunately, getSMTPObject() creates a connection if it's not already established. Ideally, the connection is already established due to the send command some lines above so we only close it. There is no way around it because the wrapped SMTP object is private.

lib/SMTP/SmtpClientFactory.php Outdated Show resolved Hide resolved
lib/Service/MailTransmission.php Outdated Show resolved Hide resolved
Unfortunately, `getSMTPObject()` creates a connection if it's not
already established. Ideally, the connection is already established due
to the send command some lines above so we only close it. There is no
way around it because the wrapped SMTP object is private.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

None yet

2 participants