# 500 Internall Server on saving email

**URL:** <https://forum.mautic.org/t/500-internall-server-on-saving-email/24763>\
**Category:** Product Support\
**Created:** [July 14, 2022, 8:11am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763 "2022-07-14T08:11:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 14, 2022, 8:11am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/1 "2022-07-14T08:11:17Z")

</div>

**Your software**  
My Mautic version is: 4.4.0  
My PHP version is: 7.4

**Your problem**  
My problem is:  
When trying to save an email I keep getting the 500 Internal server error, however the email is actually saved

These errors are showing in the log:

```auto
[2022-07-14 10:39:36] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'UPDATE emails SET custom_html = ? WHERE id = ?' with params ["\r\n\r\n\r\n\r\n  

```

Steps I have tried to fix the problem:  
Writing here 😃

---

<div class="post-metadata">

**Author:** ![logprod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/logprod/32/1447_2.png) [@logprod](https://forum.mautic.org/u/logprod)\
**Post date:** [August 15, 2024, 4:12pm UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/2 "2024-08-15T16:12:44Z")

</div>

Has this ever been addressed/fixed?

Having same issue. Mautic update frim 3.3 to 4.4

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 20, 2024, 7:31am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/3 "2024-08-20T07:31:02Z")

</div>

Hi, any spec characters in your html? Is it a valid html?

---

<div class="post-metadata">

**Author:** ![logprod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/logprod/32/1447_2.png) [@logprod](https://forum.mautic.org/u/logprod)\
**Post date:** [August 21, 2024, 8:23am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/4 "2024-08-21T08:23:44Z")

</div>

Thank you for the quick response, Joey. The 500 error occurs anytime when saving the email. .even if you simply select the basic Mautic template and save without making any changes to it. You can create a blank template and still as the initial posted stated saving an email gives out the 500 error.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 21, 2024, 9:31am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/5 "2024-08-21T09:31:50Z")

</div>

Can you go to the **emails** table, on your server, check the **html** column.  
Do you have tags like or something similar multiple times at the beginning?

---

<div class="post-metadata">

**Author:** ![logprod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/logprod/32/1447_2.png) [@logprod](https://forum.mautic.org/u/logprod)\
**Post date:** [August 25, 2024, 4:49am UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/6 "2024-08-25T04:49:49Z")

</div>

went to [maudg\_emails] and within this table I did not find “HTML”, however I did find “custom\_html” is this the column you are referencing?

If so, this is what I have in the column

```
<title>
    {subject}
</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700" rel="stylesheet" type="text/css" />
<style type="text/css">
    #outlook a {
        padding: 0;
    }
    .ReadMsgBody {
        width: 100%;
    }
    .ExternalClass {
        width: 100%;
    }
    .ExternalClass * {
        line-height: 100%;
    }
    body {
        margin: 0;
        padding: 0;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    table,
    td {
        border-collapse: collapse;
        mso-table-lspace: 0pt;
        mso-table-rspace: 0pt;
    }
    img {
        border: 0;
        height: auto;
        line-height: 100%;
        outline: none;
        text-decoration: none;
        -ms-interpolation-mode: bicubic;
    }
    p {
        display: block;
        margin: 13px 0;
    }
    @media only screen and (max-width:480px) {
        @-ms-viewport {
            width: 320px;
        }
        @viewport {
            width: 320px;
        }
    }
    body {
        font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
        font-size:14px;
        line-height:1.6;
        text-align:left;
        color:#414141;
    }
    div[data-slot="text"] {
        font-size:14px !important;
        line-height:1.6 !important;
        text-align:left !important;
        color:#414141 !important;
        margin-bottom: 10px !important;
    }
    div[style="clear:both"] {
        margin-bottom: 20px !important;
    }
    .imagecard {
        background: #eeeeee !important;
    }
    .imagecard-caption {
        font-size:12px !important;
        line-height:1.6 !important;
        text-align:center !important;
        color:#414141 !important;
        background: #eeeeee !important;
        padding: 10px !important;
    }
    h1, h2, h3, h4, h5, h6 {
        margin: 0 !important;
        margin-bottom: 10px !important;
    }
    .outlook-group-fix { width:100% !important; }
    @media only screen and (min-width:480px) {
        .mj-column-per-100 {
            width: 100% !important;
        }
    }
</style>
                                  </head>

```

| 

[ABOUT LP](https://sample)[SERVICES](https://sample)[REVIEWS](https://sample)[CLIENT FORM](https://sample)[MUSICIAN'S TOOL BOX](https://sample)

[![sample.com](https://sample.net/)](https://sample.com/)

| 

| 
  

 |

 |
| 
{contactfield=company}  
{contactfield=firstname} {contactfield=lastname}

  

RE: Music review results

  

{contactfield=firstname}

  

We have had the opportunity to review and test market your submission. The results you will find below (see below for ratings).

  

  

**{contactfield=company}**

**Primary Response (Strongest)**

  

  

**Secondary Response**

n/a

  

\*\*\*\* (4) Great potential  
\*\*\* (3) Good potential  
\*\* (2) Almost there  
\* (1) Needs work  
  

Four and three star ratings give you a recommended level towards a promotion, marketing and publicity campaign. If your release(s) met such criteria, we recommend you conduct a national campaign to increase your visibility to major record companies, publishing firms and distribution outlets. If you are attempting to secure a recording contract, publishing or distribution for your material you must have already generated substantial amount of retail sales, otherwise secured a high-level exposure. 

  

_Purpose of review:_

To provide contrasting and supplementary data based on research. sample provides objective review data from the mainstream demographic. These reviews are not a review of familiarity, but rather a review of music acceptability to the target audiences.

  

_Ratings:_

Ratings are based upon a one, two, three and four-star basis. We strongly recommend promoting songs with three or four-star rating; they have great potential to become a "standard" for the target audience and with targeted media outlets. Songs with a two-star rating are not as strong, but have solid programming value, and we also do recommend promoting them as "follow up" singles or at least re-reviewing at a later date. Songs receiving one star are "borderline", few negatives, but few positives at this point. These singles are worth keeping around for the possibility of re-visiting.
  
 |

  

| | | | | | | | |

  

:copyright: 2023 All Rights Reserved.

Tel: XXXXXXXXXX

{unsubscribe\_text} | {webview\_text} 

 |

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 25, 2024, 4:37pm UTC](https://forum.mautic.org/t/500-internall-server-on-saving-email/24763/7 "2024-08-25T16:37:50Z")

</div>

Can you use this icon:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a65bcfd7e3a5a61f0ddebb77039c20f503da94f5.png)

And paste it again? At least the top.
