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

Impelment Sisimai->match() method #173

Closed
azumakuniyuki opened this issue Mar 10, 2016 · 0 comments
Closed

Impelment Sisimai->match() method #173

azumakuniyuki opened this issue Mar 10, 2016 · 0 comments
Assignees

Comments

@azumakuniyuki
Copy link
Member

Implement new method for matching given text with all the patterns of Sisimai::Reason::*.

my $v = '550 5.1.1 User unknown';
my $r = Sisimai->match($v);
print $r; # "userunknown"

It might be usefull for getting a reason of bounce from error message of EPS's API response like
https://sendgrid.com/docs/API_Reference/Web_API/bounces.html

  {
    "status": "4.0.0",
    "created": "2011-09-19 17:47:15",
    "reason": "Connection timed out",
    "email": "rawest@gmail.co"
  },

https://docs.aws.amazon.com/ja_jp/ses/latest/DeveloperGuide/notification-contents.html

{
   "bounceType":"Permanent",
   "bounceSubType": "General",
   "bouncedRecipients":[
      {
         "status":"5.0.0",
         "action":"failed",
         "diagnosticCode":"smtp; 550 user unknown",
         "emailAddress":"recipient1@example.com"
      },
      {
         "status":"4.0.0",
         "action":"delayed",
         "emailAddress":"recipient2@example.com"
      }
   ],
   "reportingMTA": "example.com",
   "timestamp":"2012-05-25T14:59:38.605-07:00",
   "feedbackId":"000001378603176d-5a4b5ad9-6f30-4198-a8c3-b1eb0c270a1d-000000"
}
@azumakuniyuki azumakuniyuki self-assigned this Mar 10, 2016
@azumakuniyuki azumakuniyuki added this to the v4.17.1 Release milestone Mar 10, 2016
@azumakuniyuki azumakuniyuki modified the milestones: 2nd Birthday, v4.17.2 Release Jun 12, 2016
@azumakuniyuki azumakuniyuki modified the milestones: 3rd Birthday, 2nd Birthday, The last day of 2016 Aug 19, 2016
azumakuniyuki added a commit that referenced this issue Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant