Link to home
Start Free TrialLog in
Avatar of Nemetona
Nemetona

asked on

automate the process of sending emails from MS Access

I would like to be able to send colleagues an email reminder about their annual review.

I have set up the timer routine and selected the appropriate people to receive the email but when i run my routine which uses

    DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, -1


it generates the first email but then waits until I manually press the send button before it generates the next email.

I wanted to be able to run this overnight so is there any way to bypass the manual "send" and fully automate the process?
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

I believe you'd just use:
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nemetona
Nemetona

ASKER

just using DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText  made no difference as the routine paused until I had pressed the send button again.

I will have a look a vbMapi
There is also a program called ClickYes
I thought that default parameter when you don't specify -1 at the end would be 0.  Apparently the default is TRUE.  So you have to specify it with a 0 or FALSE.
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, 0
I guess mine works fine with the 0 setting because I use Thunderbird email instead of Outlook.
Yes, that would probably explain it.  Since 2007 (maybe earlier), the Outlook Security has prevented SendObject from sending emails without user interaction.  This was designed to prevent malware of all types from sending emails from an infected computer.