Emails created but sit in Outbox

NearImpossible

Registered User.
Local time
Today, 01:07
Joined
Jul 12, 2019
Messages
225
Previously I was able to generate a few emails using the code below, and when I would click the Send button, they would send without needing to open Outlook.

Code:
'Starts email
     Set oOutlook = CreateObject("Outlook.application")
     Set oEmailItem = oOutlook.CreateItem(olMailItem)
     With oEmailItem
                .SentOnBehalfOfName = "<SENDING EMAIL>"
                                .To = <RECIPIENT>
                                .Subject = <SUBJECT>
                                .HTMLBody = <MESSAGE>
                                .display
                            End With
                        End If
     Wend
               
'Clears Email settings
     Set oEmailItem = Nothing
     Set oOutlook = Nothing

For about the last 2-3 weeks, the emails just in the Outbox, until I open the Outlook App, after which they will immediately send.

Any thoughts?
 
Hi. Just a guess but maybe a recent software update affected this part of Outlook?
 
if you want to Immediately send it replace .Display with .Send
if you want to display it first, do not Destroy these objects (Set oEmailItem = Nothing, Set oOutLook = Nothing).
 

Users who are viewing this thread

Back
Top Bottom