Skip to content

"invalid addresses" exception too broad #160

@Lonzak

Description

@Lonzak

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 <valid@mail.com>: 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.' "

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions