PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, March 7, 2022

[FIXED] Error 500 on Post request using MailJet Wrapper in Php on a window 2016 server

 March 07, 2022     composer-php, iis-10, mailjet, php, windows-server-2016     No comments   

Issue

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


Solution

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.



Answered By - Simon Milne
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing