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

Parsing extended status codes #7

Open
p231970 opened this issue Jan 30, 2017 · 0 comments
Open

Parsing extended status codes #7

p231970 opened this issue Jan 30, 2017 · 0 comments

Comments

@p231970
Copy link

p231970 commented Jan 30, 2017

I got extended delivery status code which crashes detector.
Action: failed
Status: 5.7.133
Diagnostic-Code: smtp;550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group

I propose this to fix an issue:

    private static BounceStatus ParseBounceStatus(string statusCode, IDictionary<int, string> statusCodes)
    {
        var value = int.Parse(statusCode);
        if (statusCodes.ContainsKey(value))
            return new BounceStatus(value, statusCodes[value]);
        else
            return new BounceStatus(value, "");
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant