using Microsoft.WindowsMobile.PocketOutlook;
/// <summary>
/// 发送短信
/// <param name="tell"> 手机号</param>
/// <param name="dictate"> 内容</param>
/// 发送短信
/// <param name="tell"> 手机号</param>
/// <param name="dictate"> 内容</param>
/// </summary>
public static void SendCharge(string tell, string dictate)
{
try
{
//构造短信息对象
OutlookSession ols = new OutlookSession();
//发送信息
SmsMessage sms = new SmsMessage(tell.Trim(),dictate.Trim());
ols.SmsAccount.Send(sms);
public static void SendCharge(string tell, string dictate)
{
try
{
//构造短信息对象
OutlookSession ols = new OutlookSession();
//发送信息
SmsMessage sms = new SmsMessage(tell.Trim(),dictate.Trim());
ols.SmsAccount.Send(sms);
MessageBox.Show("your message has been send!", "send",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk,
MessageBoxDefaultButton.Button1);
MessageBoxButtons.OK, MessageBoxIcon.Asterisk,
MessageBoxDefaultButton.Button1);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "send", MessageBoxButtons.OK, MessageBoxIcon.Asterisk,
MessageBoxDefaultButton.Button1);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "send", MessageBoxButtons.OK, MessageBoxIcon.Asterisk,
MessageBoxDefaultButton.Button1);
}
}