Title: Mailgun Error
Last modified: April 6, 2019

---

# Mailgun Error

 *  [freemason](https://wordpress.org/support/users/freemason/)
 * (@freemason)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/mailgun-error-2/)
 * Hi,
 * I am trying to setup Mailgun and when sending a test email I get error “Error(
   4) when trying to json_decode response”. The same configuration using WP Mail
   SMTP works without errors. Can you please help me solve this?
 * Thanks
    A Jorge
 * Error (4) when trying to json_decode response
 * –Raw message follows–
 * Array
    ( [from] => Freemason.pt <xxxxxxxx@xxxx.xxx> [to] => Array ( [0] => [xxxxxxxxx@xxxx.xxx](https://wordpress.org/support/topic/mailgun-error-2/xxxxxxxxx@xxxx.xxx?output_format=md))
 *  [subject] => Postman SMTP Test (www.freemason.pt)
    [h:X-Mailer] => //wordpress.
   org/plugins/post-smtp/) [h:Content-Type] => multipart/alternative [h:Sender] 
   => [xxxxxxxxxxx@xxxx.xxx](https://wordpress.org/support/topic/mailgun-error-2/xxxxxxxxxxx@xxxx.xxx?output_format=md)[
   cc] => [bcc] => [text] => Hello!
 * Sent by Postman 1.9.8 – [https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/)
 *  [html] => <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt);
   
   <html xmlns=”[http://www.w3.org/1999/xhtml”&gt](http://www.w3.org/1999/xhtml”&gt);
   <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> 
   <style type=”text/css” media=”all”> .wporg-notification .im { color: #888; } /*
   undo a GMail-inserted style */ </style> </head> <body class=”wporg-notification”
   > <div style=”background: #e8f6fe; font-family: & quot; Helvetica Neue&quot; ,
   Helvetica ,Arial,sans-serif; font-size: 14px; color: #666; text-align: center;
   margin: 0; padding: 0″> <table border=”0″ cellspacing=”0″ cellpadding=”0″ bgcolor
   =”#e8f6fe” style=”background: #e8f6fe; width: 100%;”> <tbody> <tr> <td> <table
   border=”0″ cellspacing=”0″ cellpadding=”0″ align=”center” style=”padding: 0px;
   width: 100%;””> <tbody> <tr> <td> <div style=”max-width: 600px; height: 400px;
   margin: 0 auto; overflow: hidden;background-image:url(‘[https://ps.w.org/postman-smtp/assets/email/poofytoo.png&#8217](https://ps.w.org/postman-smtp/assets/email/poofytoo.png&#8217););
   background-repeat: no-repeat;”> <div style=”margin:50px 0 0 300px; width:300px;
   font-size:2em;”>Hello! – 你好 – Bonjour! – नमस्ते – ¡Hola! – Olá – Привет! – 
   今日は</div> <div style=”text-align:right;font-size: 1.4em; color:black;margin:
   150px 0 0 200px;”>Sent by Postman 1.9.8 <br/><span style=”font-size: 0.8em”>[https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/)
   </span> </div> </div> </td> </tr> </tbody> </table> <br><span style=”font-size:
   0.9em;color:#94c0dc;”>Image source: [poofytoo.com](http://poofytoo.com) – Used
   with permission</span> </td> </tr> </tbody> </table> </body> </html> )

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/mailgun-error-2/#post-11399425)
 * Hi,
 * Go to the plugin email log hover the failed email row, press “session transcript”
   and paste the ouput here.
 *  Thread Starter [freemason](https://wordpress.org/support/users/freemason/)
 * (@freemason)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/mailgun-error-2/#post-11399466)
 * Hi,
 * Thankd for your prompt answer. Here it is:
 * Error (4) when trying to json_decode response
 * –Raw message follows–
 * Array
    ( [from] => Freemason.pt <freemason.pt@gmail.com> [to] => Array ( [0] 
   => [freemason.pt@gmail.com](https://wordpress.org/support/topic/mailgun-error-2/freemason.pt@gmail.com?output_format=md))
 *  [subject] => Postman SMTP Test (www.freemason.pt)
    [h:X-Mailer] => //wordpress.
   org/plugins/post-smtp/) [h:Content-Type] => multipart/alternative [h:Sender] 
   => [freemason.pt@gmail.com](https://wordpress.org/support/topic/mailgun-error-2/freemason.pt@gmail.com?output_format=md)[
   cc] => [bcc] => [text] => Hello!
 * Sent by Postman 1.9.8 – [https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/)
 *  [html] => <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt);
   
   <html xmlns=”[http://www.w3.org/1999/xhtml”&gt](http://www.w3.org/1999/xhtml”&gt);
   <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> 
   <style type=”text/css” media=”all”> .wporg-notification .im { color: #888; } /*
   undo a GMail-inserted style */ </style> </head> <body class=”wporg-notification”
   > <div style=”background: #e8f6fe; font-family: & quot; Helvetica Neue&quot; ,
   Helvetica ,Arial,sans-serif; font-size: 14px; color: #666; text-align: center;
   margin: 0; padding: 0″> <table border=”0″ cellspacing=”0″ cellpadding=”0″ bgcolor
   =”#e8f6fe” style=”background: #e8f6fe; width: 100%;”> <tbody> <tr> <td> <table
   border=”0″ cellspacing=”0″ cellpadding=”0″ align=”center” style=”padding: 0px;
   width: 100%;””> <tbody> <tr> <td> <div style=”max-width: 600px; height: 400px;
   margin: 0 auto; overflow: hidden;background-image:url(‘[https://ps.w.org/postman-smtp/assets/email/poofytoo.png&#8217](https://ps.w.org/postman-smtp/assets/email/poofytoo.png&#8217););
   background-repeat: no-repeat;”> <div style=”margin:50px 0 0 300px; width:300px;
   font-size:2em;”>Hello! – 你好 – Bonjour! – नमस्ते – ¡Hola! – Olá – Привет! – 
   今日は</div> <div style=”text-align:right;font-size: 1.4em; color:black;margin:
   150px 0 0 200px;”>Sent by Postman 1.9.8 <br/><span style=”font-size: 0.8em”>[https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/)
   </span> </div> </div> </td> </tr> </tbody> </table> <br><span style=”font-size:
   0.9em;color:#94c0dc;”>Image source: [poofytoo.com](http://poofytoo.com) – Used
   with permission</span> </td> </tr> </tbody> </table> </body> </html> )
 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/mailgun-error-2/#post-11399493)
 * Please contact me here:
    [https://postmansmtp.com/contact](https://postmansmtp.com/contact)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Mailgun Error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [yehudah](https://wordpress.org/support/users/yehudah/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/mailgun-error-2/#post-11399493)
 * Status: not resolved