Sep-27-2022, 04:48 AM
I would add this code between where you get the receiver and the message, and where you send the email. This should work as it did in your test because you are using the same receiver and message body as in your test.
If that works the error must be in the message. Remove the message reassignment to verify. I'd also add in some code to print out what message is sent:
sender = "[email protected]" receiver = "[email protected]" message = """\ From: "Baxter" Subject: Alert! Hello Commander, This is a test. """ #Send EmailIf this works, remove the receiver reassignment and test if it still works:
If that works the error must be in the message. Remove the message reassignment to verify. I'd also add in some code to print out what message is sent:
autoTypeAnimation('What should I say?') msg = UserInput() message = """\ From: "Baxter" Subject: Alert! """ + msg print(type(message)) print(len(message)) print(message) #Send EmailIs the printed information what you expected to see?