Sign in
nest-open-source
/
nest-learning-thermostat
/
5.1.3
/
boost
/
refs/heads/master
/
.
/
boost_1_45_0
/
tools
/
regression
/
xsl_reports
/
utils
/
send_mail.py
blob: d0ed98fd18aff00e31fc5feec5583f2efe2fc2fa [
file
] [
log
] [
blame
]
import
smtplib
def
send_mail
(
mail
,
subject
,
msg
=
''
):
smtp_server
=
smtplib
.
SMTP
(
'mail.%s'
%
mail
.
split
(
'@'
)[-
1
]
)
smtp_server
.
sendmail
(
mail
,
[
mail
]
,
'Subject: %s\n'
%
subject
+
'To: %s\n'
%
mail
+
'\n'
+
msg
)