3 from email
.mime
.text
import MIMEText
5 def send(smtp_server
, from_email
, to_email
, subject
, body
):
6 msg
= MIMEText(body
, 'plain', 'utf_8')
7 msg
['Subject'] = subject
8 msg
['From'] = from_email
12 s
.connect(smtp_server
, 25)
13 s
.sendmail(from_email
, [to_email
], msg
.as_string())