I've recently been having issues with sending Outlook emails using Excel VBA. I already have my code to do it, Sendupdate, and it's working fine when it's manually run. I also have an automatic timer that's intended to execute the same email at a specific time. But when the computer is locked, it doesn't send the email. It's just hanging and I have to manually send it. Here's my code:
Recipient = "firstname.lastname@example.org"
Subj = "update"
Dim msg As String
msg = "hello”
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & msg
Application.Wait (Now + TimeValue("0:00:01"))
Application.OnTime TimeValue("18:00:00"), "SendUpdate"
How can I send the email through automatically?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!