Fixed character error on Windows
This commit is contained in:
parent
7626670ee8
commit
0dae270af9
|
@ -183,7 +183,10 @@ while PublicIP <= 2:
|
||||||
os.system("echo [ip2e-daemon] New IP - From "+CurrentIP+" to "+NewIP+" >> ip2e.log")
|
os.system("echo [ip2e-daemon] New IP - From "+CurrentIP+" to "+NewIP+" >> ip2e.log")
|
||||||
MailMessage="[ip2e-daemon] Email was sent successfully"
|
MailMessage="[ip2e-daemon] Email was sent successfully"
|
||||||
try:
|
try:
|
||||||
os.system("sendEmail -q -f "+FromEmail+" -t "+ToEmail+" -u '[ip2e-daemon] IP has changed' -m 'ip2e - New IP is '"+NewIP+" -s "+SmtpFromEmail+" -xu "+FromEmailUser+" -xp "+FromEmailPass)
|
if os.name == "posix":
|
||||||
|
os.system("sendEmail -q -f "+FromEmail+" -t "+ToEmail+" -u '[ip2e-daemon] IP has changed' -m '[ip2e] New IP is '"+NewIP+" -s "+SmtpFromEmail+" -xu "+FromEmailUser+" -xp "+FromEmailPass)
|
||||||
|
elif os.name == "nt":
|
||||||
|
os.system("sendEmail -q -f "+FromEmail+" -t "+ToEmail+" -u [ip2e-daemon] IP has changed -m [ip2e] New IP is "+NewIP+" -s "+SmtpFromEmail+" -xu "+FromEmailUser+" -xp "+FromEmailPass)
|
||||||
except:
|
except:
|
||||||
MailMessage="[ip2e-daemon] Fail to send email"
|
MailMessage="[ip2e-daemon] Fail to send email"
|
||||||
print (MailMessage+" ("+ToEmail+")")
|
print (MailMessage+" ("+ToEmail+")")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user