]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - tools/sendEmail
0cd3b651bdb737e397062a793a0e96c40fb1d129
5 fromaddr
= "From: ipfire01@ipfire.org"
6 toaddrs
= "To: entwickler@ipfire.org"
7 #password = "<password>"
21 if line
.startswith("From: "):
23 elif line
.startswith("To: "):
25 elif line
.startswith("Subject: "):
28 body
= body
+ line
+ "\r\n"
30 for i
in fromaddr
, toaddrs
, subject
:
31 header
= header
+ i
+ "\r\n"
33 msg
= header
+ "\r\n" + body
# An empty line to finish the header + add the body
35 server
= smtplib
.SMTP('mail01.ipfire.org')
36 #server.set_debuglevel(1)
37 #server.login(fromaddr, password)
38 server
.sendmail(fromaddr
, toaddrs
, msg
)