We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
import smtplib server = smtplib.SMTP(‘smtp.gmail.com’, 587) server.starttls() server.login(“[email protected]“, “FromUserPassword“) msg = “This is a simple email test!” server.sendmail(“[email protected]“, “[email protected]“, msg) server.quit()
Sorry, something went wrong.
New Code: import subprocess import smtplib import socket from email.mime.text import MIMEText import datetime #account info to = '[email protected]' gmail_user = '[email protected]' gmail_password = '123456' smtpserver = smtplib.SMTP('smtp.gmail.com', 587) smtpserver.ehlo() smtpserver.starttls() smtpserver.login(gmail_user, gmail_password) today = datetime.date.today() arg='ip route list' p=subprocess.Popen(arg,shell=True,stdout=subprocess.PIPE) data=p.communicate() split_data=data[0].split() ipaddr=split_data[split_data.index('src')+1] my_ip='Good day human overlord. This is your humble pi. My ip today is %s' % ipaddr msg=MIMEText(my_ip) msg['Subject']= 'Rpi2 Reporting in!' msg['From']= gmail_user msg['To'] = to smtpserver.sendmail(gmail_user, [to], msg.as_string()) smtpserver.quit()
import subprocess import smtplib import socket from email.mime.text import MIMEText import datetime #account info to = '[email protected]' gmail_user = '[email protected]' gmail_password = '123456' smtpserver = smtplib.SMTP('smtp.gmail.com', 587) smtpserver.ehlo() smtpserver.starttls() smtpserver.login(gmail_user, gmail_password) today = datetime.date.today() arg='ip route list' p=subprocess.Popen(arg,shell=True,stdout=subprocess.PIPE) data=p.communicate() split_data=data[0].split() ipaddr=split_data[split_data.index('src')+1] my_ip='Good day human overlord. This is your humble pi. My ip today is %s' % ipaddr msg=MIMEText(my_ip) msg['Subject']= 'Rpi2 Reporting in!' msg['From']= gmail_user msg['To'] = to smtpserver.sendmail(gmail_user, [to], msg.as_string()) smtpserver.quit()
Meteodeep
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: