# Can't Create E-mail. Spinning Notification After Clicking "Apply"

**URL:** <https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631>\
**Category:** Product Support\
**Created:** [August 13, 2020, 5:03pm UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631 "2020-08-13T17:03:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 13, 2020, 5:03pm UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/1 "2020-08-13T17:03:12Z")

</div>

**Your software**  
My Mautic version is: 3.0.3  
My PHP version is: 7.3.20

**Your problem**  
My problem is:  
I can’t create an e-mail. I go to Channels-\>emails. I select “New Segment E-mail”. I select a template, enter Builder. Whether I edit anything about the template or not, when I select “Apply”, I get the spinning icon in the apply button, and it hangs permanently.

These errors are showing in the log:  
[11-Aug-2020 14:00:49 America/New\_York] PHP Notice: Undefined offset: 1 in /home/savabsoq/public\_html/musocrm/marketing/app/bundles/EmailBundle/Helper/MailHelper.php on line 1935

Steps I have tried to fix the problem:  
None really. The site is hosted on my external host, and I can’t install on my local machine to debug, as I’d need to downgrade my PHP version.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 4:17am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/2 "2020-08-14T04:17:02Z")

</div>

> [@savsoft](#):
>
> marketing/app/bundles/EmailBundle/Helper/MailHelper.php

So I am looking at this:

> <https://github.com/mautic/mautic/blob/51c488ea820a36d82b513ccc36becb6e7521327f/app/bundles/EmailBundle/Helper/MailHelper.php#L1935>

and here is the code in question:

> **line 1935 [$email, $domain] = explode(‘@’, $settings[‘address’]);**

So looking at that I would ask that you check your settings regarding your monitoring email. Is it a proper email or is it set at all? Does it have the @ in it (which is where this explode function is splitting the string)? If that is fine I would consider maybe the PHP version not being good for the way they are using explode here but that’s a wile and could be wrong guess.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 4:36am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/3 "2020-08-14T04:36:14Z")

</div>

Thanks for the reply. Yes, I too looked at that line of code and that prompted me to check on the monitoring address. I do have a valid address there. I also traced back to the “isMontoringEnabled” function, and didn’t see anything obvious there.

Good point about the explode function. That function hasn’t changed since PHP 4 though. It’s definitely something inside that function, though. It must be the $settings[‘address’] that’s invalid. I wish I could debug on this end, but downgrading my PHP would break other stuff on my machine. I’ll investigate further when I get a chance, unless somebody else comes up with it before!

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 4:59am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/4 "2020-08-14T04:59:11Z")

</div>

> [@henryweismann](#):
>
> `[$email, $domain] = explode('@', $settings['address']);`

Ok, then can you erase the email in that setting rewrite the email from scratch manaully and type it into the setting field? Perhaps you copied the email from somewhere and the @ sign is a different charset or possibly messed up. Its not the first time its happened to me. Also make sure no white space at the end or beginning. I would even suggest the code here should have a trim if I were a Mautic dev unless that happens when saving the email setting.

FYI: Unless you were looking for an issue with $settings further up the stack I don’t think it has to do with $this-\>isMontoringEnabled because the fact it says undefined offset and mentions that line. Offset is the #1 key of either the array result of splitting at @ or $settings[‘address’] “address”. Which means it never split it and came up with nada from the explode function or the key address is not existing. At least that’s my best guess not being able to actually var\_dump($settings[‘address’]) or the result.

Also this is the monitoring email setting not the other email settings in Mautic config right?

One more thing. Can you use the chrome inspector to inspect the settings of Mautic for this setting and see if the form mentions ‘address’? I am not sure but usually these settings have the same index for the form field in some way. I would do it myself but I have not upgraded to Mautic 3 yet. I am always wary of the first 2-6 versions of a new major version of any software.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:38am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/5 "2020-08-14T05:38:36Z")

</div>

Yes. I’m assuming that the $settings[‘address’] is not set at this point, so the issue is further up the stack.

I have the same address in all the e-mail fields. I’ll try to attach screen shots:

 ![Screenshot 2020-08-14 at 1.35.08 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2fdc752abc307eec7e75c2e751ab14bc27ed8d5a.png)  
 ![Screenshot 2020-08-14 at 1.35.25 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2db2b118d26cb5d0a44e9bdd1e306f227ad180ef.png)

I just tried doing an error\_log() of the $settings[‘address’] value, but it’s not showing anything in the error log.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:40am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/6 "2020-08-14T05:40:25Z")

</div>

For Sh\*ts and giggles can you set the custom return address and see of the error goes away?

If that is the issue and its supposed to be optional then the dev team is missing an empty() or isset() further up the stack or in this line of code to skip it and default to whatever is supposed ot be default.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:43am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/7 "2020-08-14T05:43:23Z")

</div>

> [@henryweismann](#):
>
> For Sh\*ts and giggles can you set the custom return address and see of the error goes away?

Sure. Just tried that. Same effect.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:47am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/8 "2020-08-14T05:47:33Z")

</div>

For more Sh\*ts and Giggles can you set use custom connection settings and use the same email settings. My attempt to see if they are not handling “use same settings” case. If this gives the same error I am stumped unless I can find time to reproduce and debug in my server. I’m not upgrading to 3 for another 2 weeks though and who knows if I will encounter the same issue.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:49am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/9 "2020-08-14T05:49:45Z")

</div>

Actually one more big thing to do. I have had MANY issues with Mautic cache and when I cleared the case everything worked. This includes issues I have had with settings.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:52am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/10 "2020-08-14T05:52:47Z")

</div>

OK. I’ll try clearing the cache now. I did use custom connection settings in the “Bounces” section. It successfully retrieved my mailbox list. No change though.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:54am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/11 "2020-08-14T05:54:08Z")

</div>

By the way, the log I’m searching is my server log, not the Mautic log. That’s showing empty. Where do I clear the cache?

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:55am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/12 "2020-08-14T05:55:55Z")

</div>

This may be for Mautic 2x (although might be same for 3x) and it requires FTP or SSH access:

> **[Troubleshooting](https://docs.mautic.org/en/troubleshooting#1-clear-the-cache)**
>
> . Follow these steps to solve your issue as fast as possible.My Mautic is acting weird. Even through the effort of the dev and test teams, it might happen. At first, let's try a few tricks which might fix it fast.1. Clear the cache. There are several...

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:56am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/13 "2020-08-14T05:56:58Z")

</div>

🙂 I was just looking at that page myself. There is no cache directory under app in my installation.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 5:58am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/14 "2020-08-14T05:58:13Z")

</div>

Incidentally, the error I’m getting in my server log is a notice, not even a warning or critical. It shouldn’t stop execution.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:58am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/15 "2020-08-14T05:58:30Z")

</div>

I don’t know where its supposed to be in 3x. Might try adding one there and giving it the right perms. If it doesn’t auto generate files there then they must have moved it in 3x. It cant hurt to add the folder.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 5:59am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/16 "2020-08-14T05:59:49Z")

</div>

Then make sure your server php.ini/user.ini or wherever you can set it is set to suppress notices. You may be encountering this because your display errors is on and your outputting notices.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 6:00am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/17 "2020-08-14T06:00:00Z")

</div>

I also have a javascript warning (not error) in the console of my web browser:

“Editor should be initialized before calling the destroy method.” In froaler\_editor.js line 321

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 6:01am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/18 "2020-08-14T06:01:27Z")

</div>

I’m pretty sure it must be set to ERROR\_REPORTING=off, but I’ll check. Thanks for the suggestions.

---

<div class="post-metadata">

**Author:** ![henryweismann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/henryweismann/32/3125_2.png) [@henryweismann](https://forum.mautic.org/u/henryweismann)\
**Post date:** [August 14, 2020, 6:02am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/19 "2020-08-14T06:02:31Z")

</div>

check the phpinfo() in the Mautic system settings also in that same page check the folder and file permissions tab.

---

<div class="post-metadata">

**Author:** ![savsoft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/savsoft/32/967_2.png) [@savsoft](https://forum.mautic.org/u/savsoft)\
**Post date:** [August 14, 2020, 6:04am UTC](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631/20 "2020-08-14T06:04:25Z")

</div>

Hmm. It seems I’d already created one there. I must have been down this route before. 🙂

Interestingly:  
display\_errors On On

[Next page](https://forum.mautic.org/t/cant-create-e-mail-spinning-notification-after-clicking-apply/15631.md?page=2)
