-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add exception handling #10
Comments
@diogosantana I have introduced checks but unfortunately my local SMTP does not fail when using invalid user/emails adress ; so I am not sure it will solve the issue as expected. |
Sure. I'll test it and feed back the result here.
|
@McFoggy I do realize that my installation were using Java 7, so I got class version error. I changed to Java 8, but I was still using GitBucket 3.10 (Java 7 compiled) and got the same problem. Now I will migrate the environment to Java 8 and GitBucket 3.11, but it will take a while because of work requirements. I'll let you know. |
@diogosantana any news? could you try with your SMTP server? |
Not yet. My ops team will upgrade the server environment to match GitBucket requeriments, but it will take some days. My expectation is later this week. |
@McFoggy It worked, the e-mail message were sent to all valid address and a error message was registered to the log. But item 3 is stil occuring. |
@diogosantana I have adapted the code and published a temporary version on my fork Using gmail smtp I do not receive any failure when using non existing emails, so again I need you to test. Thanks for your support and feedback. |
It worked. But when I simulate another kind of Exception (authetication failed) the page show "Announce has been sent.". I do contribute a PR to your fork, please have a look. With those changes all went well. |
The PR: McFoggy#1 |
There is no specific exception handling for sending e-mail. This cause a lot of undesirable behavior:
You could use setSendPartial to prevent behavior number 2, but it still will needed to handle exception.
It also will be nice to log which e-mails were invalid with SendFailedException.getInvalidAddresses.
Sorry not to provide a PR, but I don't work with Scala.
The text was updated successfully, but these errors were encountered: