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