-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[mail] Ensure SMTP thing status reflects connection status #17817
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Gaël L'hopital <[email protected]>
Signed-off-by: Gaël L'hopital <[email protected]>
Signed-off-by: Gaël L'hopital <[email protected]>
Signed-off-by: Gaël L'hopital <[email protected]>
/** | ||
* use this server to send a mail | ||
* | ||
* @param mail the Email that needs to be sent | ||
* @return true if successful, false if failed | ||
*/ | ||
public boolean sendMail(Email mail) { | ||
Session localSession = session; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do it like this a single failed login (or connection problem) during initialization leads to an "forever unable to send mail" state. I don't think that's really a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@J-N-K : you're correct. Changed.
…to open the connection if it was not opened. Signed-off-by: Gaël L'hopital <[email protected]>
Signed-off-by: Gaël L'hopital <[email protected]>
@clinique - please see #12972 (comment). 🙂 This will ensure that the issue gets linked and closed upon completing the PR. |
Split session initialization from mail sending
Resolves #17337