1 | SMSCODES = { |
---|
2 | 'Aliant': '@chat.wirefree.ca', |
---|
3 | 'Alltel': '@message.alltel.com', |
---|
4 | 'Ameritech': '@paging.acswireless.com', |
---|
5 | 'AT&T': '@txt.att.net', |
---|
6 | 'AU by KDDI': '@ezweb.ne.jp', |
---|
7 | 'BeeLine GSM': '@sms.beemail.ru', |
---|
8 | 'Bell Mobility Canada': '@txt.bellmobility.ca', |
---|
9 | 'Bellsouth': '@bellsouth.cl', |
---|
10 | 'BellSouth Mobility': '@blsdcs.net', |
---|
11 | 'Blue Sky Frog': '@blueskyfrog.com', |
---|
12 | 'Boost': '@myboostmobile.com', |
---|
13 | 'Cellular South': '@csouth1.com', |
---|
14 | 'CellularOne': '@mobile.celloneusa.com', |
---|
15 | 'CellularOne West': '@mycellone.com', |
---|
16 | 'Cincinnati Bell': '@gocbw.com', |
---|
17 | 'Claro': '@clarotorpedo.com.br', |
---|
18 | 'Comviq': '@sms.comviq.se', |
---|
19 | 'Dutchtone/Orange-NL': '@sms.orange.nl', |
---|
20 | 'Edge Wireless': '@sms.edgewireless.com', |
---|
21 | 'EinsteinPCS / Airadigm Communications': '@einsteinsms.com', |
---|
22 | 'EPlus': '@smsmail.eplus.de', |
---|
23 | 'Fido Canada': '@fido.ca', |
---|
24 | 'Golden Telecom': '@sms.goldentele.com', |
---|
25 | 'Idea Cellular': '@ideacellular.net', |
---|
26 | 'Kyivstar': '@sms.kyivstar.net', |
---|
27 | 'LMT': '@sms.lmt.lv', |
---|
28 | 'Manitoba Telecom Systems': '@text.mtsmobility.com', |
---|
29 | 'Meteor': '@sms.mymeteor.ie', |
---|
30 | 'Metro PCS': '@mymetropcs.com', |
---|
31 | 'Metrocall Pager': '@page.metrocall.com', |
---|
32 | 'MobileOne': '@m1.com.sg', |
---|
33 | 'Mobilfone': '@page.mobilfone.com', |
---|
34 | 'Mobility Bermuda': '@ml.bm', |
---|
35 | 'Netcom': '@sms.netcom.no', |
---|
36 | 'Nextel': '@messaging.nextel.com', |
---|
37 | 'NPI Wireless': '@npiwireless.com', |
---|
38 | 'O2': '@o2.co.uk', |
---|
39 | 'O2 M-mail': '@mmail.co.uk', |
---|
40 | 'Optus': '@optusmobile.com.au', |
---|
41 | 'Orange': '@orange.net', |
---|
42 | 'Oskar': '@mujoskar.cz', |
---|
43 | 'Pagenet': '@pagenet.net', |
---|
44 | 'PCS Rogers': '@pcs.rogers.com', |
---|
45 | 'Personal Communication': '@pcom.ru', |
---|
46 | 'Plus GSM Poland': '@text.plusgsm.pl', |
---|
47 | 'Powertel': '@ptel.net', |
---|
48 | 'Primtel': '@sms.primtel.ru', |
---|
49 | 'PSC Wireless': '@sms.pscel.com', |
---|
50 | 'Qualcomm': '@pager.qualcomm.com', |
---|
51 | 'Qwest': '@qwestmp.com', |
---|
52 | 'Safaricom': '@safaricomsms.com', |
---|
53 | 'Satelindo GSM': '@satelindogsm.com', |
---|
54 | 'SCS-900': '@scs-900.ru', |
---|
55 | 'Simple Freedom': '@text.simplefreedom.net', |
---|
56 | 'Skytel - Alphanumeric': '@skytel.com', |
---|
57 | 'Smart Telecom': '@mysmart.mymobile.ph', |
---|
58 | 'Southern Linc': '@page.southernlinc.com', |
---|
59 | 'Sprint PCS': '@messaging.sprintpcs.com', |
---|
60 | 'Sprint PCS - Short Mail': '@sprintpcs.com', |
---|
61 | 'SunCom': '@tms.suncom.com', |
---|
62 | 'SureWest Communications': '@mobile.surewest.com', |
---|
63 | 'SwissCom Mobile': '@bluewin.ch', |
---|
64 | 'T-Mobile Germany': '@T-D1-SMS.de', |
---|
65 | 'T-Mobile Netherlands': '@gin.nl', |
---|
66 | 'T-Mobile UK': '@t-mobile.uk.net', |
---|
67 | 'T-Mobile USA (tmail)': '@tmail.com', |
---|
68 | 'T-Mobile USA (tmomail)': '@tmomail.net', |
---|
69 | 'Tele2 Latvia': '@sms.tele2.lv', |
---|
70 | 'Telefonica Movistar': '@movistar.net', |
---|
71 | 'Telenor': '@mobilpost.no', |
---|
72 | 'Telia Denmark': '@gsm1800.telia.dk', |
---|
73 | 'Telus Mobility': '@msg.telus.com', |
---|
74 | 'The Phone House': '@sms.phonehouse.de', |
---|
75 | 'TIM': '@timnet.com', |
---|
76 | 'UMC': '@sms.umc.com.ua', |
---|
77 | 'Unicel': '@utext.com', |
---|
78 | 'US Cellular': '@email.uscc.net', |
---|
79 | 'Verizon Wireless (vtext)': '@vtext.com', |
---|
80 | 'Verizon Wireless (airtouchpaging)': '@airtouchpaging.com', |
---|
81 | 'Verizon Wireless (myairmail)': '@myairmail.com', |
---|
82 | 'Vessotel': '@pager.irkutsk.ru', |
---|
83 | 'Virgin Mobile Canada': '@vmobile.ca', |
---|
84 | 'Virgin Mobile USA': '@vmobl.com', |
---|
85 | 'Vodafone Italy': '@sms.vodafone.it', |
---|
86 | 'Vodafone Japan (n)': '@n.vodafone.ne.jp', |
---|
87 | 'Vodafone Japan (d)': '@d.vodafone.ne.jp', |
---|
88 | 'Vodafone Japan (r)': '@r.vodafone.ne.jp', |
---|
89 | 'Vodafone Japan (k)': '@k.vodafone.ne.jp', |
---|
90 | 'Vodafone Japan (t)': '@t.vodafone.ne.jp', |
---|
91 | 'Vodafone Japan (q)': '@q.vodafone.ne.jp', |
---|
92 | 'Vodafone Japan (s)': '@s.vodafone.ne.jp', |
---|
93 | 'Vodafone Japan (h)': '@h.vodafone.ne.jp', |
---|
94 | 'Vodafone Japan (c)': '@c.vodafone.ne.jp', |
---|
95 | 'Vodafone Spain': '@vodafone.es', |
---|
96 | 'Vodafone UK': '@vodafone.net', |
---|
97 | 'Weblink Wireless': '@airmessage.net', |
---|
98 | 'WellCom': '@sms.welcome2well.com', |
---|
99 | 'WyndTell': '@wyndtell.com', |
---|
100 | } |
---|
101 | |
---|
102 | |
---|
103 | def sms_email(number, provider): |
---|
104 | """ |
---|
105 | >>> print sms_email('1 (312) 375-6536','T-Mobile USA (tmail)') |
---|
106 | print 13123756536@tmail.com |
---|
107 | """ |
---|
108 | import re |
---|
109 | if number[0] == '+1': |
---|
110 | number = number[1:] |
---|
111 | elif number[0] == '+': |
---|
112 | number = number[3:] |
---|
113 | elif number[:2] == '00': number = number[3:] |
---|
114 | number = re.sub('[^\d]', '', number) |
---|
115 | return number + SMSCODES[provider] |
---|