Created
August 3, 2017 10:09
-
-
Save spy86/2dd6f6cb26326f10cbfd0e4d5f1a6ab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const MSG_RECIPIENT_LIST = "[email protected]" | |
Const MSG_SUBJECT = "Some Subject" | |
Const MSG_BODY = "Testing" | |
Dim olkApp, olkSes, olkMsg | |
Set olkApp = CreateObject("Outlook.Application") | |
Set olkSes = olkApp.GetNamespace("MAPI") | |
olkSes.Logon olkApp.DefaultProfileName | |
Set olkMsg = olkApp.CreateItem(0) | |
With olkMsg | |
.To = MSG_RECIPIENT_LIST | |
.Subject = MSG_SUBJECT | |
.HTMLBody = MSG_BODY | |
.Send | |
End With | |
olkSes.Logoff | |
Set olkMsg = Nothing | |
Set olkSes = Nothing | |
Set olkApp = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have multiple email accounts synced, how do i get it to select the "From" address.