<bdo id='8S2wW'></bdo><ul id='8S2wW'></ul>

    1. <small id='8S2wW'></small><noframes id='8S2wW'>

    2. <i id='8S2wW'><tr id='8S2wW'><dt id='8S2wW'><q id='8S2wW'><span id='8S2wW'><b id='8S2wW'><form id='8S2wW'><ins id='8S2wW'></ins><ul id='8S2wW'></ul><sub id='8S2wW'></sub></form><legend id='8S2wW'></legend><bdo id='8S2wW'><pre id='8S2wW'><center id='8S2wW'></center></pre></bdo></b><th id='8S2wW'></th></span></q></dt></tr></i><div id='8S2wW'><tfoot id='8S2wW'></tfoot><dl id='8S2wW'><fieldset id='8S2wW'></fieldset></dl></div>

        <tfoot id='8S2wW'></tfoot>
      1. <legend id='8S2wW'><style id='8S2wW'><dir id='8S2wW'><q id='8S2wW'></q></dir></style></legend>

        如何在 Windows 应用程序中使用 SMTP 服务器向手机发送短信?

        How to send SMS to mobile using SMTP server in windows application?(如何在 Windows 应用程序中使用 SMTP 服务器向手机发送短信?)
          <legend id='b3plr'><style id='b3plr'><dir id='b3plr'><q id='b3plr'></q></dir></style></legend>

          1. <tfoot id='b3plr'></tfoot>
                <tbody id='b3plr'></tbody>
              <i id='b3plr'><tr id='b3plr'><dt id='b3plr'><q id='b3plr'><span id='b3plr'><b id='b3plr'><form id='b3plr'><ins id='b3plr'></ins><ul id='b3plr'></ul><sub id='b3plr'></sub></form><legend id='b3plr'></legend><bdo id='b3plr'><pre id='b3plr'><center id='b3plr'></center></pre></bdo></b><th id='b3plr'></th></span></q></dt></tr></i><div id='b3plr'><tfoot id='b3plr'></tfoot><dl id='b3plr'><fieldset id='b3plr'></fieldset></dl></div>

              <small id='b3plr'></small><noframes id='b3plr'>

                  <bdo id='b3plr'></bdo><ul id='b3plr'></ul>
                  本文介绍了如何在 Windows 应用程序中使用 SMTP 服务器向手机发送短信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述


                  我正在使用 C# 开发一个 Windows 应用程序,我想在其中根据某些条件向某些用户发送 SMS.我浏览了许多论坛帖子以使用 SMTP 服务器发送短信",但没有一个对我有用.在 this 我得到了一些通过 Gmail SMTP 发送短信的线索,但我认为它是特定于运营商的(不确定).
                  我的代码示例:


                  I am developing a windows application using C#, in which i want to send SMS to some user based on some condition. i goes through the many forum post to "Send SMS using SMTP Server" but none of them use-full for me. In this i got some clue to send SMS through Gmail SMTP but not working as i think it is carrier specific (not sure).
                  My code sample :

                  try
                  {
                      MailMessage message = new MailMessage();
                      message.To.Add("1568235685@sms.sancharnet.in");
                      message.From = new MailAddress("sameone@gmail.com"); //See the note afterwards...
                      message.Body = "Hi, How r you ?";
                  
                      SmtpClient smtp = new SmtpClient("smtp.gmail.com");
                      smtp.EnableSsl = true;
                      smtp.Port = 587;
                      smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                      smtp.Credentials = new NetworkCredential("someonet@gmail.com", "password");
                  
                      smtp.Send(message);
                      MessageBox.Show("Message sent successfully");
                  }
                  catch (Exception ex)
                  {
                      MessageBox.Show(ex.Message, "Error");
                  }
                  

                  上面的代码没有给出任何异常或错误,但我的号码也没有收到任何短信.

                  那么,我想问的是,有没有办法使用 SMTP 服务器向任何运营商的手机号码发送短信?

                  above code not giving any exception or error but also i am not getting any sms on my number as well.

                  So, what i want to ask that is there any way to send SMS using SMTP server to the mobile number of any carrier?

                  推荐答案

                  你必须发送到短信网关.它是特定于提供商的.

                  You have to send to the SMS gateway. It is provider specific.

                  维基百科有一个短信网关列表.

                  例如,要发送到 Sprint PCS 号码,您可以发送到 number@messaging.sprintpcs.com,其中 number 是电话号码(即 5551234567 或其他).

                  For example, to send to a Sprint PCS number you would send to number@messaging.sprintpcs.com, where number is the phone number (i.e. 5551234567, or whatever).

                  这篇关于如何在 Windows 应用程序中使用 SMTP 服务器向手机发送短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  Parameter count mismatch with Invoke?(参数计数与调用不匹配?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  How delegates work (in the background)?(代表如何工作(在后台)?)
                  C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                • <small id='sqw0Q'></small><noframes id='sqw0Q'>

                  <tfoot id='sqw0Q'></tfoot>
                    <tbody id='sqw0Q'></tbody>
                      <bdo id='sqw0Q'></bdo><ul id='sqw0Q'></ul>

                            <legend id='sqw0Q'><style id='sqw0Q'><dir id='sqw0Q'><q id='sqw0Q'></q></dir></style></legend>
                            <i id='sqw0Q'><tr id='sqw0Q'><dt id='sqw0Q'><q id='sqw0Q'><span id='sqw0Q'><b id='sqw0Q'><form id='sqw0Q'><ins id='sqw0Q'></ins><ul id='sqw0Q'></ul><sub id='sqw0Q'></sub></form><legend id='sqw0Q'></legend><bdo id='sqw0Q'><pre id='sqw0Q'><center id='sqw0Q'></center></pre></bdo></b><th id='sqw0Q'></th></span></q></dt></tr></i><div id='sqw0Q'><tfoot id='sqw0Q'></tfoot><dl id='sqw0Q'><fieldset id='sqw0Q'></fieldset></dl></div>