You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,24 @@ $mj = new \Mailjet\Client(getenv('MJ_APIKEY_PUBLIC'),
181
181
182
182
If your account has been moved to Mailjet's US architecture, the URL value you need to set is `api.us.mailjet.com`.
183
183
184
+
#### Network Connectivity
185
+
186
+
By default, the library forces IPv4 connections to avoid intermittent SSL connection issues on servers with misconfigured IPv6. This resolves the common `SSL_ERROR_SYSCALL` error.
187
+
188
+
If you need to use IPv6 or system default, you can override this setting:
189
+
190
+
```php
191
+
$mj = new \Mailjet\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'));
192
+
193
+
// Use IPv6
194
+
$mj->addRequestOption('force_ip_resolve', 'v6');
195
+
196
+
// Or use system default (both IPv4 and IPv6)
197
+
$mj->addRequestOption('force_ip_resolve', null);
198
+
```
199
+
200
+
**Note:** If you experience intermittent connection failures, ensure IPv4 forcing is enabled (default behavior).
201
+
184
202
### Disable API call
185
203
186
204
By default the API call parameter is always enabled. However, you may want to disable it during testing to prevent unnecessary calls to the Mailjet API. This is done by setting the third parameter to `false`:
0 commit comments