Unable to save emails

Hi, for your information, this is how email creation works:

Emails are saved in a table called “emails” in the Mautic database. Not only the html itself, but all connected information (author, dates, custom tokens etc.) are saved in this table in various columns.

This happens, when you click on the SAVE button in the Email settings page. As a default, the selected empty template will be saved in the HTML column of your Emails table.

Once you enter the visual editor (GrapesJs), there are 2 different ways the email content is saved:

If you are using a HTML template (for example “Blank”), then the contents will be saved directly in the custom_html column of your emails table. If you are using an MJML table, like Brienz, then a new table is used, called bundle_grapesjstable, where also the custom_html column is used for saving the content. This mjml code is used for populating the emails table custom_html column.

TLDR:

There is no autosaving feature right now. When you close the GrapesJS builder, the content is not saved yet, it is only happening when you push the save button outside the visual editor.

A common reason for not being able to save emails, is wrong html content in your email.
Just an example: Mautic’s email editor supports emojies. But if your tables are in the wrong encoding format, then Mautic won’t be able to save the HTML code.

Saving the email content is done by a http call in the background. In other words your Email Editor will talk to itself. Crazy, ha? Well, sometimes if you have multiple Software on the same server, other systems might think the same. Especially Wordpress’ Wordfence can think, that Mautic is going crazy, and blocks the traffic. The result is emails not being saved. So check your firewalls.

I already resolved it. I also had the problem that when creating an email a request “POST https://mysite.com/mautic/s/emails/new?mauticUserLastActive=21&mauticLastNotificationId=” was generated, which caused the error “403 (Forbidden)”.

I asked the technical support of my hosting to include my domain in a white list or exempt from the ModSecurity rules, they did it and the problem was solved. Thank you.