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

Undefined property: stdClass::$diagnosticCode #144

Closed
markimpmc opened this issue Jul 30, 2021 · 1 comment
Closed

Undefined property: stdClass::$diagnosticCode #144

markimpmc opened this issue Jul 30, 2021 · 1 comment

Comments

@markimpmc
Copy link

Today the following exception was thrown:
Undefined property: stdClass::$diagnosticCode

in the file jdavidbakr/mail-tracker/src/RecordBounceJob.php line 73

Searching the AWS SNS documentation, apparently, the diagnosticCode property is not always sent:

diagnosticCode

The status code issued by the reporting MTA. This is the value of the Diagnostic-Code field from the DSN. This field may be absent in the DSN (and therefore also absent in the JSON).

The following is an example of a bounce object.

{
   "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.605Z",
   "feedbackId":"000001378603176d-5a4b5ad9-6f30-4198-a8c3-b1eb0c270a1d-000000",
   "remoteMtaIp":"127.0.2.0"
}
@jdavidbakr
Copy link
Owner

Thanks for the catch - fixed in 5.0.5

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

2 participants