# Twilio Issues

**URL:** https://forum.mautic.org/t/twilio-issues/23777
**Category:** Product Support
**Created:** [April 18, 2022, 12:28pm UTC](https://forum.mautic.org/t/twilio-issues/23777 "2022-04-18T12:28:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)
#### Post date: [April 18, 2022, 12:28pm UTC](https://forum.mautic.org/t/twilio-issues/23777/1 "2022-04-18T12:28:53Z")

</div>

**Your software**  
My Mautic version is:4.1.1  
My PHP version is:7.4.3  
My Database type and version is:10.3.34-MariaDB-0ubuntu0.20.04.1

**Your problem**  
My problem is: I can send sms sometimes with twilio and others times I have errors. The error is get is  
“Last execution error: Scheduled”

Can an sms have a merge field - {contactfield=firstname} ?

The sms is a simple text message less that 160 characters. It contains a 1st name merge field and a web address. I have a paid Twilio account and I have been able to successfully send a sms to my own number using mautic and the trial twilio account. My next test is also via a campaign to a segment of 3 people. Their numbers are formatted correctly.

These errors are showing in the log: [2022-04-18 14:13:42] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type null - in file /var/www/mautic/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"}

Steps I have tried to fix the problem: I have double checked all the twilio / mautic integration settings. The Twilio log is not picking up the sms’s so it appears as if they are not. being to sent Twilio by mautic, ie the issue lies with mautic.

---

<div class="post-metadata">

### Author: ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)
#### Post date: [April 20, 2022, 7:04am UTC](https://forum.mautic.org/t/twilio-issues/23777/2 "2022-04-20T07:04:48Z")

</div>

I believe this has been fixed in 4.2

Issue was that the per contact frequency rule for text is defaulted to blank. Mautic reads that as only allowing 1 text per day and ignores the frequency settings in the twilio plugin. Upping the frequency allowed in the per contact preference centre fixed the issue. You can globally fix the frequency issue by either upgrading to 4.2 or applying the PR fix found here [Mautic 4 - Twilio, can't send more than 1 text message, it breaks after the first sms · Issue #10637 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/10637)

Big thanks to @mikew and @joeyk for taking time out to help find the issue and the fix
