# Troubleshooting Mautic 5.0.3 Upgrade: Sparkpost Plugin Issues and Character Escaping Errors

**URL:** <https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906>\
**Category:** Mautic 5 Install/Upgrade Support\
**Tags:** email, mautic-5\
**Created:** [February 15, 2024, 7:25pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906 "2024-02-15T19:25:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 15, 2024, 7:25pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906/1 "2024-02-15T19:25:58Z")

</div>

**Your software**  
My Mautic version is: 5.0.3  
My PHP version is: 8.0.30  
My Database type and version is: MySQL 8.0.33

**Your problem**  
My problem is:

I recently upgraded from Mautic 4.4.10 to 5.0.3 and am attempting to use the Sparkpost plugin ([GitHub - ts-navghane/sparkpost-plugin: Sparkpost Mailer Plugin for Mautic](https://github.com/ts-navghane/sparkpost-plugin)). I ran into a number of issues the first being a fatal php error thrown while running cache:clear (and presumably other console commands). I managed to resolve this by running “composer install --no-dev --optimize-autoloader” (I have no idea if this has caused other issues), after which the plugin seems to be installed. However, trying to send a test email I keep receiving the error “[{“message”:“No sending domain specified”,“code”:“7001”}]” even though my “Email address to send mail from” is set correctly.

Further more, and likely unrelated, as part of my sparkpost configuration I have custom email headers set and everytime I save the config my custom email header values are character escaped malforming my configuration. For example my json string which is supposed to take the form {{“options”: { "… is being escaped everytime I save the config… {{&#38;#38;#34;options … and just gets longer and longer.

![chrome_2024-02-16_06-20-18](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/ec7a6a1a0112dd4503e7586649e191176c8e384a.png)

These errors are showing in the log:

php.CRITICAL: Fatal Error: During class fetch: Uncaught ReflectionException: Class “Liip\TestFixturesBundle\Test\FixturesTrait” not found while loading “MauticPlugin\SparkpostBundle\Tests\Functional\EventSubscriber\CallbackSubscriberTest”.

Steps I have tried to fix the problem:

Running this command…

composer install --no-dev --optimize-autoloader

… seems to resolve the fatal php error, but it also removes a bunch of testing packages that I am not sure will cause issues elsewhere.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 15, 2024, 10:26pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906/2 "2024-02-15T22:26:15Z")

</div>

I haven’t figured out the `No sending domain specified` issue yet, but I did log a bug for the value encoding issue for the custom header values…

[JSON value custom email header values are being html encoded on save](https://github.com/mautic/mautic/issues/13387)

Commenting out the `mailer_custom_headers` line below in the file `app/bundles/EmailBundle/Form/Type/ConfigType.php` is a quick interim fix…

```auto
$builder->addEventSubscriber(
            new CleanFormSubscriber(
                [
                    'mailer_from_email' => 'email',
                    'mailer_return_path' => 'email',
                    'default_signature_text' => 'html',
                    'unsubscribe_text' => 'html',
                    'unsubscribe_message' => 'html',
                    'resubscribe_message' => 'html',
                    'webview_text' => 'html',
                    // Encode special chars to keep congruent with Email entity custom headers
                    //'mailer_custom_headers' => 'clean',
                ]
            )
        );

```

---

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 16, 2024, 4:21am UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906/3 "2024-02-16T04:21:49Z")

</div>

> [@tacester](#):
>
> “[{“message”:“No sending domain specified”,“code”:“7001”}]”

So this ended up being caused by the use of an “@” symbol in the “Email sender display name” field, which looks to be a problem in Mautic 5 and wasn’t an issue in 4 (presumably is was being escaped properly in 4).
