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 forwarded text preceded by >
sp_NewTopic Add Topic
November 2, 2015
10:12 am
Henk Helmantel
Admin
Forum Posts: 1573
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

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

private void OnMessageToSend(string recordId, string toAddress, string fromAddress,
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

November 1, 2015
12:36 pm
petersauven
Guest
Guests

is there a way to strip out the forwared bits of an email that start with >

Forum Timezone: Europe/Amsterdam
Most Users Ever Online: 1119
Currently Online:
Guest(s) 7
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