• I kept getting Test Failed error across 2 test sites with the Test mail option. After a little bit of debugging I discovered the wp_remote_post function in Postmark’s wp_mail.php was giving a name lookup timed out error. It appears my DNS was a bit slow to resolve names.

    Since the wp_remote_post function takes a timeout (I think the default at 5 is perhaps too short) I added it to the args array in the wp_mail.php function as ‘timeout 20’. This fixed things and the test mails succeeded consistently. Alternatively Using a faster DNS like Google’s 8.8.8.8 may work too. All the same perhaps it may be a good idea to add a timeout 20 to the plugin by default.

    BTW the plugin is simple, robust and just works. I tested a number of other options for transactional mail. Only Mandrill, Sendgrid, Mailgun and Postmark support mail via an http api. A lot of others I found use SMTP. I found Postmark was the simplest to setup of the lot, is fuss free and works consistently. The website is simple and easy to use too. And contrary to the 4.0 mentioned here it worked fine on 3.8 and 3.9 in my tests.

    https://www.ads-software.com/plugins/postmark-approved-wordpress-plugin/

Viewing 1 replies (of 1 total)
  • hi buddy,

    what was the exact code you wrote and where did you insert it, i am still struggling with this timeout error:

    WP_Error Object
    (
    [errors] => Array
    (
    [http_request_failed] => Array
    (
    [0] => cURL error 28: Connection timed out after 5001 milliseconds
    )

    )

    [error_data] => Array
    (
    )

    )

Viewing 1 replies (of 1 total)
  • The topic ‘Postmark Test mail failed possible solution’ is closed to new replies.