<reponame>rodolfoplazaherz/Xinxorro
import socket
import smtplib
import time
import os
import subprocess

email = "<EMAIL>"
password = "<PASSWORD>"
to = "<EMAIL>"

hostname = socket.gethostname()
local_ip = subprocess.check_output('hostname -I', shell=True) 

with smtplib.SMTP_SSL('172.16.31.10', 465) as smtp:

    smtp.login(email, password)

    subject = "{} {}".format(hostname, time.ctime())
    body = "{}".format(local_ip)

    msg = "Subject: {}\n\n{}".format(subject, body)

    smtp.sendmail(email, to, msg)
import socket
import smtplib
import time
import os
import subprocess

email = "<EMAIL>"
password = "<PASSWORD>"
to = "<EMAIL>"

hostname = socket.gethostname()
local_ip = subprocess.check_output('hostname -I', shell=True) 

with smtplib.SMTP_SSL('172.16.31.10', 465) as smtp:

    smtp.login(email, password)

    subject = "{} {}".format(hostname, time.ctime())
    body = "{}".format(local_ip)

    msg = "Subject: {}\n\n{}".format(subject, body)

    smtp.sendmail(email, to, msg)