예제 #1
0
    /// <summary>
    /// 依据后台配置,使用不同的接口发出短信.1:深圳电信,2:北京网通,3:亿美
    /// </summary>
    public static string SendMessage(string phone, string msg)
    {
        SendWebSMS client = new SendWebSMS();
        string     result = "";

        switch (SiteConfig.SiteOption.DefaultSMS)
        {
        case "0":    //关闭
            result = "";
            break;

        case "1":    //深圳电信
            result = client.SendByBJWT(phone, msg);
            break;

        case "2":    //北京网通(东时方)
            result = client.SendByEast(phone, msg).ToString();
            break;

        case "3":    //亿美
            result = client.SendByYM(phone, msg);
            break;

        case "4":    //云通讯
            result = client.SendMsgByCCP(phone, msg);
            break;

        default:
            result = "运营商选择错误";
            break;
        }
        return(result);
    }
예제 #2
0
    /// <summary>
    /// 依据后台配置,使用不同的接口发出短信.1:深圳电信,2:北京网通,3:亿美
    /// </summary>
    public static string SendMessage(string phone, string msg)
    {
        SendWebSMS client = new SendWebSMS();
        string     result = "";

        switch (SMSConfig.Instance.DefaultSMS)
        {
        case "0":    //关闭
            result = "";
            break;

        case "1":    //深圳电信
            result = client.SendByBJWT(phone, msg);
            break;

        case "2":    //北京网通(东时方)
            result = client.SendByEast(phone, msg).ToString();
            break;

        case "3":    //亿美
            result = client.SendByYM(phone, msg);
            break;

        case "qcloud":
            break;

        default:
            result = "运营商选择错误";
            break;
        }
        return(result);
    }