Emails created but sit in Outbox (1 Viewer)

NearImpossible

Registered User.
Local time
Today, 05:00
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?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:00
Joined
Oct 29, 2018
Messages
21,358
Hi. Just a guess but maybe a recent software update affected this part of Outlook?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:00
Joined
May 7, 2009
Messages
19,175
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

Top Bottom