Sparkpost Web Api delivery server validation problem - solved

Fero Gachulinec

New Member
I had a problem with my Sparkpost Web Api delivery server validation. Mailwizz could not validate this server for the reasons bellow:
  • Cannot send the confirmation email using the data you provided.
  • Here is a transcript of the error message:
  • Problem with the SSL CA cert (path? access rights?
I found out this is a mistake of Sparkpost not Mailwizz.
Solution (I use 1.3.7.2 version):
1. Go to /apps/common/models and open DeliveryServerSparkpostWebApi.php in your editor
2. go to line 167 where is curl_setopt($ch, CURLOPT_URL, "https://api.sparkpost.com/api/v1/transmissions");
3. insert this command under this line: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
this command equals curl --insecure in your putty terminal, similar to wget --no-check-certificate.
4. It is needed to do also bellow in the php script:

line 244: curl_setopt($ch, CURLOPT_URL, "https://api.sparkpost.com/api/v1/webhooks");
insert line 245: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
line 273: curl_setopt($ch, CURLOPT_URL, "https://api.sparkpost.com/api/v1/webhooks/" . $id);
insert line 274: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
line 293: curl_setopt($ch, CURLOPT_URL, "https://api.sparkpost.com/api/v1/webhooks");
insert line 294: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
5. save it
Now you can validate this server. This problem can be temporary. Sparkpost has a ssl certificate problem.

...
 
Top