Support forum

Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

Remove line breaks
sp_NewPost Add Reply sp_NewTopic Add Topic
August 3, 2016
3:19 pm
Henk Helmantel
Forum Posts: 1502
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:

message = message.Replace("\r", " ").Replace("\n", " "); while (message.Contains(" ")) message = message.Replace(" ", " ");

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

PostDispatchMessage(recordId, toAddress, fromAddress, message, messageType, "GSM Modem Gateway", "");

Regards, Henk

August 2, 2016
8:37 pm


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: 529

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 677

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1149

Posts: 3928

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1502