# Twillio and Mautic 4.0.1

**URL:** https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513
**Category:** Mautic 4 Install/Upgrade Support
**Created:** [November 3, 2021, 10:49pm UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513 "2021-11-03T22:49:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fkrafft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fkrafft/32/2220_2.png) [@fkrafft](https://forum.mautic.org/u/fkrafft)
#### Post date: [November 3, 2021, 10:49pm UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/1 "2021-11-03T22:49:10Z")

</div>

**Your software**  
_My PHP version is_ : 7.4.24  
_My MySQL/MariaDB version is_ (delete as applicable): 10.3.31-MariaDB-0ubuntu0.20.04.1

**Updating/Installing Errors**  
_I am_ (delete as applicable): Clean installation Mautic 4.0.1  
_Upgrading/installing via_ (delete as applicable) :Command Line

_These errors are showing in the installer_ : NO

_These errors are showing in the Mautic log_ :  
mautic.NOTICE: PHP Notice - Trying to access array offset on value of type null - in file /var/www/html/m4/app/bundles/SmsBundle/Form/Type/SmsSendType.php -  
at line 84 {“builder”:"[object] (Symfony\Component\Form\FormBuilder: {})",“options”:{“block\_name”:null,“disabled”:false,“label\_format”:null,“label\_translation\_parameters”:,“attr\_translation\_parameters”:,  
“translation\_domain”:null,“auto\_initialize”:true,“trim”:true,“required”:true,“property\_path”:null,“mapped”:true,“by\_reference”:true,“inherit\_data”:false,“compound”:true,“method”:“POST”,“action”:"",  
“post\_max\_size\_message”:“The uploaded file was too large. Please try to upload a smaller file.”,“allow\_file\_upload”:false,“help\_translation\_parameters”:,“error\_mapping”:,  
“invalid\_message”:“This value is not valid.”,“invalid\_message\_parameters”:,“allow\_extra\_fields”:false,“extra\_fields\_message”:“This form should not contain extra fields.”,  
“csrf\_protection”:true,“csrf\_field\_name”:"\_token",“csrf\_message”:“The CSRF token is invalid. Please try to resubmit the form.”,  
“csrf\_token\_manager”:"[object] (Symfony\Component\Security\Csrf\CsrfTokenManager: {})",“csrf\_token\_id”:null,“block\_prefix”:null,“label”:false,“row\_attr”:,“attr”:,  
“data”:null,“data\_class”:null,“empty\_data”:"[object] (Closure: {})",“error\_bubbling”:true,“label\_attr”:,“upload\_max\_size\_message”:"[object] (Closure: {})",“help”:null,“help\_attr”:,  
“help\_html”:false,“validation\_groups”:null,“constraints”:,“update\_select”:“campaignevent\_properties\_sms”},“windowUrl”:"/s/sms/new?contentOnly=1&updateSelect=campaignevent\_properties\_sms"}

**Your problem**  
_My problem is_ :  
Installed the Twillio plugin.  
Managed to send a test message using the Twillio number.  
Then I changed in the Twillio plugin to Alpha number instead of phon number.  
Then I was not able to send any message, changed back to telephone number but then I only manage to send one text message and then it break.

_Steps I have tried to fix the problem_ :  
Tested create an sms message with both Marketing message and Text message for the campaign. Same issue with both.

Tested to deactivate grapejs, that did not help either.

Switched to 3.3.3 and it works like a charm, also with Alpha number.

---

<div class="post-metadata">

### Author: ![fkrafft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fkrafft/32/2220_2.png) [@fkrafft](https://forum.mautic.org/u/fkrafft)
#### Post date: [November 24, 2021, 10:58am UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/3 "2021-11-24T10:58:55Z")

</div>

Looks like the issue is that Mautic does not allow for sending more than 1 text message per day unless you change it specifically in the preferences on each contact.  
No matter what settings you have in the twilio plugin.

That is why I did manage to get the first text message out and then the second one did not get sent.

So the bug is that the setting of number of messages per day, per user, is not read from the plugin.

This is specifically for Mautic 4.  
On Mautic 3 it works.

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [November 24, 2021, 11:24am UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/4 "2021-11-24T11:24:44Z")

</div>

I suspect this is related to the bug here:

> <https://github.com/mautic/mautic/issues/10416>
>
> \### Mautic Version
> 
> 4.0.0
> 
> \### PHP version
> 
> 7.4.3
> 
> \### What browsers are… you seeing the problem on?
> 
> Chrome
> 
> \### What happened?
> 
> While testing email-queue today I encountered an issue where only the first email was sent out to a Segment, the next Emails that I wanted to send out to the segment got into the queue but were never sent out and also werent to be found in the Spool folder.
> 
> This seems to be related to the "Default Frequency Rule", which is set to the following on a fresh 4.0.0 install:
> 
> !\[image\](https://user-images.githubusercontent.com/55587275/132662790-4680b876-15b8-4385-9107-2664f6b83ed3.png)
> 
> Removing the "0" from the "Do not send me more than", thus setting it to blank, doesnt solve the Issue, I had to manually raise the "Do not contact me more than" ammount, which resulted in me being able to send out emails again.
> 
> It seems to be an Issue that the Default Frequency Rule does apply even though it has a "0", kind of indicating that the rule wont apply unless changed.
> 
> \### How can we reproduce this issue?
> 
> Step 1: Go to the Mautic Configuration -\> Email Settings
> Step 2: See if the Default Frequency Rule is set to 0 / days, which is currently the default for a fresh install
> Step 3: Activate email-queueing
> Step 4: Create a test segment with a test contact in it
> Step 5: Create a segment mail and send it to the test-segment
> Step 6: The email should be sent out correctly
> Step 7: Create another test-email and sent it to the test-segment again
> Step 8: The Email should be queued, but won´t be send out and is not found in the spool-folder as the default frequency rule blocks it
> 
> \### Relevant log output
> 
> \_No response\_
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

The workaround is to update in your global settings the value for the default frequency, to something other than zero. So for example, set it to 10 per day or something - whatever works for your business.

---

<div class="post-metadata">

### Author: ![fkrafft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fkrafft/32/2220_2.png) [@fkrafft](https://forum.mautic.org/u/fkrafft)
#### Post date: [November 24, 2021, 11:31am UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/5 "2021-11-24T11:31:55Z")

</div>

Yeah, I also believe they are related. Though I did change the settings in the Email tab under configuration and it did not affect the Text message limitation.

In the standard plugin for Twilio, there are also general settings, and I changed this too but it did not have any effect.

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [November 24, 2021, 11:33am UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/6 "2021-11-24T11:33:43Z")

</div>

Would you mind adding that as a comment on the GitHub issue? That would be really helpful for developers to know if you’ve set the global frequency to something higher (and the sends aren’t getting blocked by a user’s preference being lower than the number already sent).

---

<div class="post-metadata">

### Author: ![fkrafft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fkrafft/32/2220_2.png) [@fkrafft](https://forum.mautic.org/u/fkrafft)
#### Post date: [November 24, 2021, 2:25pm UTC](https://forum.mautic.org/t/twillio-and-mautic-4-0-1/21513/7 "2021-11-24T14:25:13Z")

</div>

It is already in the Github issue, posted as a reply.

```auto
In configuration / Email, I have set the number of Default Frequency Rule to 10 and this does not influence the number of text messages allowed to be sent per day either.

```

Or are you asking for something else?
