Support forum
Hello Peter,
In the basic- and full editions of Diafaan SMS Server you can use a Scripting Gateway with a small script that strips out the lines starting with '>' and then dispatches the message to the GSM Modem Gateway or SMPP Gateway.
- First, add a Scripting Gateway to Diafaan SMS Server
- Set the message routing from the Email Connector to the Scripting Gateway only
- Change the 'OnMessageToSend' function in the script to change and dispatch the message
The following 'OnMessageToSend' function strips the '>' lines from the message and ten forwards the message to the gateway with the name: 'GSM Modem Gateway':
string message, string messageType)
{
string[] lines = message.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
message = "";
foreach (string line in lines) {
if (!line.StartsWith(">")) message += line + '\n';
}
PostDispatchMessage(recordId, toAddress, fromAddress, message, messageType, "GSM Modem Gateway", "");
}
Regards, Henk
Most Users Ever Online: 529
Currently Online:
10 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 672
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1141
Posts: 3899
Newest Members:
, Henk HelmantelAdministrators: Henk Helmantel: 1488