Automatically send multiple emails from Outlook at specific times
I have a need to send an email every 10 seconds for about 2 minutes,
but I'd like to schedule this to occur starting at a specific time
(8:59) and ending near a specific time (9:01).
I need to ensure that an email is sent starting at 8:59 for the first
one and send the same email again every 10 seconds (interval-wise) but
I need it to end at 9:01 or so.
Below I have listed TWO options for automatically sending emails at specific times
Use sendEmail, Batch Script, and Windows Task Scheduler
One way (at the bottom of my answer) is with scheduling a batch
script to send on a custom schedule with Windows Task Scheduler
with the
sendEmail
application.
I setup the batch script logic below for the sendEmail script to have a counter in it that starts at 0 and ends at 12 with about 10 seconds between each next higher digit counting up by 1.
(This means you will want to start this script at the exact time and second you want it to start and it'll send every 10 seconds up until 2 minutes (e.g. 8:59:00 AM) after that point.)
![enter image description here](../../I/static/images/a5e837363bcf27e181ac33df644105b6a10ef52751073cbfaa3411ef084189af.png)
It appears Windows Task Scheduler doesn't get as granular with scheduling or triggering a task to the second (one minute interval seems to be it's limit). I put a 120 second timer in the batch script logic below, and it'll send an email every 10 seconds until it counts to 120 seconds (or two minutes) and then end.
Getting sendEmail Ready and Scheduled with Batch Script
Scheduled Batch Script with sendEmail
(You should be able to get away with the above "No TLS" download and exe for the sendEmail application that you'll schedule for sending emails with a batch script, calling it via command line, and scheduling it with Windows Task Scheduler—If you have trouble or need to authenticate with TLS, I'll add an example script how to do it that way as well if needed.)
(When you download the Zip file from the links provided, just put the exe
in a Windows directory in your PATH
environmenal variable (i.e. %SYSTEMROOT%\System32
) or call it full path explictly (e.g. "C:\SendEmail\sendEmail.exe"
). The example batch script logic expects it in a PATH
environmental variable location. If you need logic to point to it explicitly, tell me the full path where you need to reference the exe
and I'll add an example that way too.)
@ECHO OFF
::: --// Set the counter variable to zero when script begins
SET Counter=0
GOTO :okNowReallySendEmail
:SendEmail
::: --// Add 1 to counter variable to know when it gets to 12 for every 10 seconds is two minutes 8:59 - 9:01
SET /A Counter=%Counter%+1
::: --// Ping delay to loopback roughly 10 second count
PING -n 10 127.0.0.1 > NUL
::: --// End if counter is 12 as that's 12 times 10 which equals 120 seconds roughly
IF %Counter%==12 GOTO EOF
:okNowReallySendEmail
SET EMAILSERVER=emailserver.domain.com
SET subject=This is my subject
SET FromAddress=YourEmailAddress@Domain.com
SET ReplyAddress=YourEmailAddress@Domain.com
SET ToAddress=ToEmailAddress@Domain.com
SET EMAILBODY1=This is my email body paragraph1
SET EMAILBODY2=This is my email body paragraph2
SET Signature=My Name
SENDEMAIL -f %FromAddress% -t %ToAddress% -u %subject% -m "%EMAILBODY1%<br /> <br />%EMAILBODY2%<br /> <br />%Signature%" -s %EMAILSERVER%:25 -o message-content-type=html reply-to=%ReplyAddress%
GOTO :SendEmail
Task Scheduler
See this answer here for full details of what options you should pick when scheduling this job with Windows Task Scheduler ⇒ Options to Select with Task Scheduler Job Setup
(Don't forget to upvote this answer if helpful as well)
Use Outlook Delay or Schedule Sending Messages
The second way is with Outlook (2010 and 2013) using the Delay or schedule sending messages feature that is a little less specific on the time scheduling part (not by the second either).
When you tell Outlook not send before a certain time on a certain date, it'll send as soon as Outlook's outbox emails try to send queue items out when it's that time or later when it's triggered.
I have seen email sent via this method keep the date and time stamp of the actually time you sent these options and press Send rather than the time you told it to not run before. When you press Send to send it out, it just sits in an Outlook outbox queue until that time but not before.
![enter image description here](../../I/static/images/4a15af15aff6f3511b5081703cb8cbb4a2c070a9f24c36a18931acbb687d3830.png)
![Outlook 2013](../../I/static/images/b69a27275fcd8fb2ed2deca47c7ef772bf967855679a162c2aa8f05b0dea9353.png)
![Outlook 2010](../../I/static/images/00cd49fc1335369bd10fe42d79dc3dd1365e3a41a3a87f02e4c8b5b07dec5ce2.png)
@LMFAO_A_JOKE internal – Celeritas – 2016-01-08T04:01:05.920
@LMFAO_A_JOKE 2016, I'm admin on my machine but I'm not a network admin. – Celeritas – 2016-01-08T04:22:04.580