SureMail and EmailIT

Tech Articles | 26 February 2026 | Blog, Coding, SureMail, Wordpress

I raised a ticket for this one a little while ago and have got more and more concerned as time moves on, and as of today, I still haven’t seen a changelog entry to cover this change within Suremail, but Emailit is sunsetting their V1 API in just 2 days (end of Feb) I don’t have enough details on what will happen here i.e will they put a forwarder in place.

emailit api sunsetting

I am ok, I have Notify for suremail installed on every single site I have SureMail on, and it will tell me if delivery fails because of this, but I wanted to be ready, as far as I can tell in testing, the change is simply a case of changing the endpoint v1 —> v2 but I can’t sub class this as its a private but thankfully its a http request so we can swap it out.

So I have done some further testing this evening and have decided this seems to work great, and have prepared a patch I can deploy to my sites as needed to prevent any further issues in testing. It works; the error logs perfectly prove interception is happening, and the emails are being delivered.

<?php
/**
 * Force SureMails Emailit endpoint to v2.
 */

add_filter('pre_http_request', function ($preempt, $args, $url) {

    // Change this to the URL you want to replace.
    $old = 'https://api.emailit.com/v1/emails';
    $new = 'https://api.emailit.com/v2/emails';

    // Only swap when it matches exactly (or use strpos if needed).
    if ($url !== $old) {
        return $preempt; // let WP handle everything else normally
    }

    // Prevent infinite recursion when we call wp_safe_remote_post() below.
    static $in_progress = false;
    if ($in_progress) {
        return $preempt;
    }
    $in_progress = true;
    
    
    // Optional Log interception
    //error_log('[SureMails Emailit Override] Intercepted request: ' . $url);
    //error_log('[SureMails Emailit Override] Redirecting to: ' . $new);


    // Perform the request to the new endpoint with the same args.
    $response = wp_safe_remote_request($new, $args);

    $in_progress = false;

    // Returning a response array here short-circuits the original request.
    return $response;

}, 10, 3);
JavaScript
emailit debug log proof of concept

This patch if nessary means I am prepared even if SureMail hasn’t updated before the sunsets of V1, I can use my deploy script and emergency updates to get this on every site within about 10 minutes of becoming aware on Saturday.

Update: 27th Feb 2026

I got an email to say an update has been released this morning, and this includes the API changes for Emailit

Support the Author

Support my work
Really Useful Plugin Logo
Wpvideobank temp
Appoligies for any spelling and grammer issue. As a dyslexic i need to rely on tools for this they like me are not perfect but I do try my best