eclipse-ee4j / eclipse-ee4j/angus-mail
"invalid addresses" exception too broad
- Dominant language
- Java
- Stars
- 87
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
I recently got lots of error messages from jakarta/angus mail: `Invalid addresses` but on further inspection (most of) the addresses were correct and valid. I had to dig through a lot of exception causes until I got to the real issue(s). Those were for example:
```
'Invalid Addresses' (3x caused by later): 471 4.7.1 : The limits for your account are exceeded. Please try again later.
'Invalid Addresses' (3x caused by later): 550 5.4.4 Unable to relay
'Invalid Addresses' (3x caused by later): 500 5.0.0 Syntax error, command unrecognized
'Invalid Addresses' (3x caused by later): 555-5.5.2 Syntax error, cannot decode response. For more information, go to 555-5.5.2 https://support.google.com/a/answer/3221692 and review RFC 5321 555 5.5.2 specifications.
'Invalid Addresses' (3x caused by later): 554 5.7.1 Client host rejected: Access denied
```
It seems that "invalid addresses" is some kind of default or fallback error message, which is however incorrect in certain (many?) cases.
Would it be possible to use a different error message like `Error sending mail` in case no clear or an unknown error code is used.
Ideally (optionally) the cause from the server would be great:
> "Error sending email. The server reply was: '471 4.7.1 The limits for your account are exceeded.' "
Contributor guide
Research direction
Start by tracing where the “Invalid Addresses” exception is created and how SMTP server replies and exception causes are handled. Reproduce the examples in the issue, then compare the resulting exception message with the server reply. Done means non-address failures no longer report valid recipients as invalid, with the server cause retained when available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100