Support forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_TopicIcon
Remove line breaks
sp_NewTopic Add Topic
August 3, 2016
3:19 pm
Henk Helmantel
Admin
Forum Posts: 1573
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Mohsin,

In the basic- and full editions of Diafaan SMS Server you can use a Scripting Gateway to filter the message text and dispatch the messages to another gateway for sending.

To set this up, first route the messages from the Email Connector to the Scripting Gateway. Then in the 'OnMessageToSend' function in the script filter the message to replace one or more new lines to a single space character:

<p><input type='button' class='sfcodeselect' name='sfselectit5452' value='Select Code' data-codeid='sfcode5452' /></p><div class='sfcode' id='sfcode5452'>message = message.Replace(&quot;&#092;r&quot;, &quot; &quot;).Replace(&quot;&#092;n&quot;, &quot; &quot;);
while (message.Contains(&quot;  &quot;)) message = message.Replace(&quot;  &quot;, &quot; &quot;);
</div>

Finally, dispatch the message to another gateway (here named 'GSM Modem Gateway'):

<p><input type='button' class='sfcodeselect' name='sfselectit2093' value='Select Code' data-codeid='sfcode2093' /></p><div class='sfcode' id='sfcode2093'>PostDispatchMessage(recordId, toAddress, fromAddress, message, messageType, &quot;GSM Modem Gateway&quot;, &quot;&quot;);
</div>

Regards, Henk

August 2, 2016
8:37 pm
Mohsin
Guest
Guests

Hello,

I am using Diafaan Gateway to let users send SMS from a website to their mobile phones. I am doing this by receiving emails from POP.

Some of the site users are adding unnecessary line breaks to their messages and the SMS they get looks awful. Is there any way in this software i can remove line breaks from their messages ?

Forum Timezone: Europe/Amsterdam
Most Users Ever Online: 1119
Currently Online:
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 703
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1195
Posts: 4079
Newest Members:
, Henk Helmantel
Administrators: Henk Helmantel: 1573