mirror of
https://github.com/Findus23/suntracking.git
synced 2024-08-27 19:52:18 +02:00
15 lines
282 B
Python
15 lines
282 B
Python
import smtplib
|
|
from email.mime.text import MIMEText
|
|
|
|
from config import by, to
|
|
|
|
|
|
def sendmail(subject, text):
|
|
msg = MIMEText(text)
|
|
|
|
msg['Subject'] = subject
|
|
msg['From'] = by
|
|
msg['To'] = to
|
|
|
|
s = smtplib.SMTP('localhost')
|
|
s.sendmail(by, [to], msg.as_string())
|