且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从Web应用程序使用asp.net和c#发送短信到手机?

更新时间:2022-12-21 13:36:20

大多数运营商提供了可用于通过电子邮件发送短信电子邮件后缀。一般:

Most carriers provide an email suffix that can be used to send an SMS through email. Generally:

[PhoneNumber]@[Suffix]

您可以联系各个载波得到他们的后缀,但这里是一个列表(大部分北美航空公司),让你开始:

You can contact individual carriers to get their suffix, but here is a list (Mostly North American carriers) to get you started:

Name                          Gateway
7-11 Speakout                 @cingularme.com
Alaska Communications Systems @msg.acsalaska.com
Alltel Wireless               @message.alltel.com
American Messaging            @amsmsg.net
AT&T Enterprise Paging        @page.att.net
AT&T Mobility                 @cingularme.com
AT&T Wireless                 @txt.att.net
BeepOne                       @beepone.net
Bell Mobility & Solo Mobile   @txt.bell.ca
Boost Mobile                  @myboostmobile.com
Cellular One                  @mobile.celloneusa.com
Cellular South                @csouth1.com
Centennial Wireless           @cwemail.com
Cingular                      @cingularme.com
Cricket                       @mms.mycricket.com
Fido                          @fido.ca
Globalstar                    @msg.globalstarusa.com
Helio                         @myhelio.com
Illinois Valley Cellular      @ivctext.com
Indiana Paging Network        @ipnpaging.com
Iridium                       @msg.iridium.com
MetroPCS                      @mymetropcs.com
MTS                           @text.mtsmobility.com
Ntelos                        @nteloswireless.com
Page1                         @page1email.com
President's Choice            @txt.bell.ca
ProPage Inc.                  @page.propage.net
Qwest                         @qwestmp.com
Rogers                        @pcs.rogers.com
Rogers Paging                 @paging.rogers.com
Sasktel                       @sms.sasktel.com
Shentel                       @shentel.net
Sprint (Nextel)               @page.nextel.com
Sprint (PCS)                  @messaging.sprintpcs.com
Suncom                        @tms.suncom.com
T-Mobile                      @tmomail.net
Telus Mobility                @msg.telus.com
Thumb Cellular                @sms.thumbcellular.com
Tracfone                      @cingularme.com
Unicel                        @utext.com
US Cellular                   @email.uscc.net
USA Mobility                  @usamobility.net
Verizon                       @vtext.com
Virgin Mobile (Canada)        @vmobile.ca
Virgin Mobile (USA)           @vmobl.com

更CO​​M prehensive名单可以在这里找到:的http:// EN。 wikipedia.org/wiki/List_of_carriers_providing_SMS_transit

这个方法要求用户输入自己的号码时,以指定的细胞载体,但你可以向他们发送的文本免费(从你的角度)一样.NET发送电子邮件。

This approach requires your users to specify their cell carrier when entering their number, but then you can send them texts for free (from your perspective) the same as sending an email in .NET.

作为一个方面说明,主题行并不总是正确ptted间$ P $。大多数运营商只是转换一个电子邮件到SMS像 [主题] [正文] 但一些完全丢弃主题。

As a side note, subject lines are not always interpretted correctly. Most carriers just convert an email to sms like [Subject] [Body] but some discard the Subject completely.

也有提供这种服务(当然费用)的公司。最明显的是 Twilio 但快速谷歌搜索应该找你多一些。

There are also companies that provide this service (for a fee of course). The most obvious is Twilio but a quick Google search should find you some more.