Sending email does not work when I run the script, but line by line, it works, why?
问题 I have this simple script that I use to send myself email with a status on a server. It runs, and it gives me no errors, but I do not receive any email, and there is no email in the sent folder at Google. But if I copy and paste every line by line into python in a shell, it does send email and works. There are no errors anywhere. I even get accepted status from Google. UPDATE: I might have cut to much code out of the sample, and the i variable was accidentally taken out. I have added it again