Unable to get Twilio text message (SMS) to work

Your software
My Mautic version is: 4.4.5
My PHP version is: 7.4.33
My Database type and version is: MySQL 8.0.28

Your problem
My problem is: I’ve created a Twilio trial account and configured it and sent a test message from it and that worked.

I’ve then configured the Mautic plugin as per the documentation (which appears to be slightly out of date) with the Account SID, Auth Token and Sending Phone Number. I’ve “Published” the plugin (I assume this is how it is enabled).

I’ve then created a segment and added a contact with a “mobile” number to the segment. Under “Channels” I’ve got to the “Text Messages” section and created a “New List Text Message”, added the content and segment and published it. It is showing in the Mautic interface as “1 Pending”:

I’ve gone to the console and run the command:

/var/www/html/bin/console mautic:broadcasts:send

and I get the response:



+---------+--------+----------+
| Channel | # sent | # failed |
+---------+--------+----------+

So it doesn’t even seem to be trying to send the message.

I noticed in the Twilio interface when sending a test text message there is another parameter passed in the curl example called MessagingServiceSid but I don’t see anywhere in the Mautic interface to add this.

So what am I missing? Thanks.

These errors are showing in the log: None

Steps I have tried to fix the problem: I’ve tried disabling and re-enabling the Twilio plugin and re-adding the Twilio credentials.

UPDATE - 2023-01-16: Today I’ve tried sending an SMS via a “campaign” instead of as a “broadcast” and that has worked successfully, so the link between Mautic and Twilio is obviously working, but I’m still unable to see why it isn’t sending the “List Text Message” to the segment.

I’ve figured this out by looking over the code and it’s really sort of stupid from both my side and Mautic’s.

Screenshot 2023-01-16 at 11.26.18

So, “Published” = “Yes” doesn’t mean it is published if you don’t have a “Publish at (date/time)” set. So really the “Published” field is completely pointless, as it is only published when there is a date/time set, so really it only needs the date/time field and not the other.

From my side, I should have noticed the “publish at” field and tried adding a value to it, but it was showing as “published” on both the edit and list screen, so I feel that thinking it was published is valid:

Screenshot 2023-01-16 at 11.26.52

So, either the “published” field needs to go, as it is superfluous, or it needs to display some sort of validation message on “save” to say it isn’t published until a “publish at (date/time)” is added and it shouldn’t show as published on the list screen either until it is added and the publish at date/time has past.

Anyway, it is all working now and anyone who has this issue in the future has this to refer to.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.