0

I have used the standard MailJet wrapper and php script to produce an email from our website. We are using the php wrapper for this. I installed the wrapper using composer so believe we have all the correct dependencies. When executing the script it works up until the following line:

$response = $mj->post(Resources::$Email, ['body' => $body]);

We have input the correct API and Secret keys and are running php 7.3.13 on the server.

I believe the code is correct as if i copy the website onto a shared Linux server it all runs to completion and we receive an email. I suspect that there is a flag or standard php add on we might require that is available on our shared server but not the windows one.

We just did a bog standard install of php on the server using the web platform installer as was recommended.

If anyone has any ideas as to what could be missing i would be grateful! Im not big on php so apologies if it is something stupid.

Thanks,

Simon

  • Please share the full and exact error message – Nico Haase Jun 06 '20 at 08:50
  • Could you post a screenshot for the error message? Please enable display_error and IIS detailed error message. – Jokies Ding Jun 08 '20 at 09:14
  • Hi, Thanks for the help, i have enabled the logging, and it seems to be a problem with SSL settings! This is the error its generating: – Simon Milne Jun 08 '20 at 18:31
  • PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) – Simon Milne Jun 08 '20 at 18:32

1 Answers1

0

Thanks for helping, after getting to the logs i found that i needed to update the settings for curl in my php.ini file to point to the cacert File i downloaded from their website. Now this is set its running and sending messages.