You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
43 lines
1.4 KiB
import smtplib |
|
from mailinfo import * |
|
from email.mime.multipart import MIMEMultipart |
|
from email.mime.text import MIMEText |
|
|
|
print(username, hostname, portno) |
|
|
|
server=smtplib.SMTP_SSL(host=hostname,port=portno) |
|
server.set_debuglevel(1) |
|
#server.starttls() |
|
server.ehlo() |
|
server.login(username,password) |
|
|
|
message=MIMEMultipart() |
|
message['From']=username |
|
message['To']='6045618656@sms.rogers.com' |
|
message['Subject']="I can python" |
|
body="Sending a text message via command script." |
|
|
|
message.attach(MIMEText(body,'plain')) |
|
|
|
server.send_message(message) |
|
|
|
server.quit() |
|
|
|
|
|
''' |
|
Bell: [10-digit phone number]@txt.bell.ca |
|
Chatr: [10-digit phone number]@sms.rogers.com (rogers was PCS, now SMS) |
|
Eastlink: [10-digit phone number]@txt.eastlink.ca |
|
Fido: [10-digit phone number]@fido.ca |
|
Freedom: [10-digit phone number]@txt.freedommobile.ca |
|
Koodo Mobile: [10-digit phone number]@msg.koodomobile.com |
|
MTS: [10-digit phone number]@text.mtsmobility.com |
|
PC Mobile: [10-digit phone number]@mobiletxt.ca |
|
Public Mobile: [10-digit phone number]@msg.telus.com |
|
Rogers: [10-digit phone number]@pcs.rogers.com |
|
Sasktel: [10-digit phone number]@sms.sasktel.com |
|
Solo Mobile: [10-digit phone number]@txt.bell.ca |
|
TBayTel: [10-digit phone number]@pcs.rogers.com |
|
TELUS: [10-digit phone number]@msg.telus.com |
|
Virgin Mobile: [10-digit phone number]@vmobile.ca |
|
'''
|
|
|