如果要发送的 SMS 消息少于 70 个字符,我的代码可以正常工作。
我想发送每条消息包含 70 到 200 个字符的消息。
using GsmComm.GsmCommunication;
using GsmComm.PduConverter;
using GsmComm.Server;
using GsmComm.PduConverter.SmartMessaging;
namespace SMSSender
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string msg = " کو ہم نے";
GsmCommMain comm = new GsmCommMain(4, 19200, 500);
comm.Open();
SmsSubmitPdu pdu;
pdu = new SmsSubmitPdu(msg, "03319310077", DataCodingScheme.NoClass_16Bit);
comm.SendMessage(pdu);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}