I am having trouble getting task scheduler to send an email via python. The particular python code I am using creates a monthly export, grabbing data from a SQL database, and then sends an email notifying the team where the export is located. For the email, I am using smtplib.
Here is the issue. I can run the export from pycharm, and the export and the send email works fine. I can run the export from task scheduler and JUST the export runs. In other words, only when I run the .bat file of the code from task scheduler, the email doesn't send. Does anyone happen to know the solution?