We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95432b1 + 69d03ff commit 7593389Copy full SHA for 7593389
src/ApiClient.php
@@ -26,6 +26,7 @@ class ApiClient implements ApiInterface
26
private $token;
27
28
private $refreshToken = 0;
29
+ private $retry = false;
30
31
/**
32
* @var null|TokenStorageInterface
@@ -1090,6 +1091,13 @@ public function smtpSendMail($email)
1090
1091
1092
$requestResult = $this->sendRequest('smtp/emails', 'POST', $data);
1093
1094
+ if ($requestResult->http_code !== 200 && !$this->retry) {
1095
+ $this->retry = true;
1096
+ sleep(2);
1097
+
1098
+ $requestResult = $this->smtpSendMail($email);
1099
+ }
1100
1101
return $this->handleResult($requestResult);
1102
}
1103
0 commit comments