Configuration file
C#
x
13
13
1
namespace ConsoleApplicationTestSmsSend
2
{
3
class ConfigData
4
{
5
public String user_login = "***********@*****.***";
6
public String api_key = "**********************";
7
public String [] sms_recipients = {"+33600000000"};
8
public String sms_text = "test text";
9
public String sms_type = QUALITE_PRO;
10
public String sms_mode = INSTANTANE;
11
public String sms_sender = "Octopush";
12
}
13
}
Main File
C#
xxxxxxxxxx
1
18
18
1
namespace ConsoleApplicationTestSmsSend
2
{
3
class SendSMS
4
{
5
static void Main(string[] args)
6
{
7
SMS sms = new SMS();
8
ConfigData configData = new ConfigData();
9
sms.set_user_login(configData.user_login);
10
sms.set_api_key(configData.api_key);
11
sms.set_sms_type(configData.sms_type);
12
sms.set_sms_recipients(configData.sms_recipients);
13
sms.set_sms_text(configData.sms_text);
14
sms.set_sms_mode(configData.sms_mode);
15
string msg = sms.send(configData.DOMAIN , configData.PATH_SMS ,configData.PORT);
16
}
17
}
18
}