Created
February 8, 2019 09:35
-
-
Save spy86/afc6c5f3a684d4775c892e4e57731ca6 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 = "some-email@gmail.com" | |
| 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