0
votes

I use a python script to send mails. The script runs a VBA macro.

I'm scheduling the python script to run at a particular time.

Configuration

My trust settings in Outlook has all macros enabled. I'm running the task with highest priority too.

Problem

I am able to send mails if I run the script manually. However, when I try to run it via Windows Task Scheduler, mails are not being sent.

2
Have you tried running other software / scripts with the scheduler? Does this work?nostradamus
Hi, yes. I've tried to run other python scripts. It works great. Ex : - I have a script in which I perform operations on excel application. TS runs the script.Abul

2 Answers

1
votes

Try a different scheduler and see if this works.

For example Splinterware system scheduler.

Trying a different scheduler can help you figure out if the problem is

  • a setting in the scheduler (like not having the password entered)
  • or in your Python script (which would affect all schedulers)
1
votes

There is a way to send emails from Outlook automatically without the use of Task Scheduler. It is outlined neatly here.

It uses recurring reminders, so Outlook must be kept running at all times (but the macro is only executed when the reminder fires).