2 methods:
Sending Mail with OutLook
1 | Function SendMail() |
OutlookSecurityPopup1
2
3
4
5
6
7
8
9
10
11
12
13Set fso = CreateObject("WScript.Shell")
if fso.AppActivate("Microsoft Office Outlook") = FALSE then
wscript.Sleep 10000
end if
if fso.AppActivate("Microsoft Office Outlook") = true then
wscript.Sleep 1000
fso.AppActivate("Microsoft Office Outlook")
fso.SendKeys "{tab}"
fso.SendKeys "{tab}"
wscript.sleep 1000
fso.SendKeys "{ENTER}"
end if
Sending mail without a security popup
1 | Const SMTPSERVER = "xxxxxx" |