Oct-27-2018, 09:34 PM
No, the problem is the
The easiest solution, would be to move the
while True
. You never recreate the file attachment, you never re-open the file, you never build a new email. You open the file once, when the script starts, and then never look at it again.The easiest solution, would be to move the
while True
to be the first line of the function, so you rebuild the email each time you want to send it.