• Resolved Joe

    (@joewa1980)


    With Optimize Email Sending set to on, the ? symbol is rendering as a ? symbol in the final email output. When Optimize Email Sending is off, the ? symbol sends as ?.

    Section of code we use for this email:

    $subject = sprintf2(__("Page updated on Website?", "ourtheme"), [
    "site_name" => get_bloginfo("name"),
    ]);
    
    $to = get_option("admin_email");
    
    $headers =
        "From: " .
        get_bloginfo("name") .
        " <" .
        get_option("admin_email") .
        ">" .
        "\r\n";
    
    wp_mail($to, $subject, $message, $headers);
    }

    I tried adding "Content-Type: text/html; charset=UTF-8" . "\r\n"; to the function, but it still didn’t work. Also hardcoding the ? symbol as its HTML entity equivalent &reg; also didn’t work.

    It works fine with Optimize Email Sending set to off.

    • This topic was modified 8 months, 2 weeks ago by Joe.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support David

    (@dpinson)

    Hi there @joewa1980,

    Thanks for reaching out! We tried to replicate this on our side but were unable to do so. Can you let us know which mailer you’re using?

    Thanks!

    Thread Starter Joe

    (@joewa1980)

    Thanks @dpinson – we use Mailgun.

    Interestingly, the ??symbol?shows as it should in our WordPress mail log, but only shows correctly in the final output of the received email when Optimize Email Sending?is set to off. It shows as a ? symbol in the Mailgun sent email log.

    Plugin Support David

    (@dpinson)

    Hi @joewa1980,

    Thanks for the additional info. We’re checking into this again and I’ll let you know what we find!

    Plugin Support David

    (@dpinson)

    Hi there @joewa1980,

    We tried running the symbol through a connection to Mailgun and it came through correctly for us in both the Mailgun dashboard logs and the Apple Mail client.

    Which email client are you using to view the emails? Also, earlier you mentioned when Optimize is off, it works fine. Can you try running a test with optimize on and off, and check the Mailgun logs to see if it stays as the ? symbol for both times?

    Right now we’re still unable to reproduce the problem. I wonder if there may be some other factor specific to your site (such as another plugin) that is causing this to happen. That would explain why we are having trouble reproducing it.

    Additionally, you could try switching mailers to see if the problem is specifically with Mailgun or not. For instance, Brevo has a free tier you could switch to temporarily to try sending through.

    I hope that helps! Have a great day!

    Thread Starter Joe

    (@joewa1980)

    Thanks for looking into this @dpinson. A real mind-boggler.

    It’s only the one particular code instance (above) that outputs the ??symbol?incorrectly (only) when Optimize Email Sending is activated, so we’ve changed that section of code and will monitor any other instances, but currently everything else seems fine.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Optimize Email Sending – ? showing as ?’ is closed to new replies.