Emails getting stuck in Outbox

Status
Not open for further replies.
J

John

Hi

I am sending a number of emails (around 600) using the vb.net code below.

The problem is that the emails end up in the OL2007 Outbox with a clock icon

and do not go out. If I open one of the email items and click Send then that

item goes out but this technique is too cumbersome for 600 or so emails.

What is the problem and how can I fix it?

Many Thanks

Regards
 
K

Ken Slovak - [MVP - Outlook]

What code below?

If you are setting a delayed sending time on the items that would account

for what you see.

"John" <info@nospam.infovis.co.uk> wrote in message

news:eGI0vsG5JHA.3476@TK2MSFTNGP05.phx.gbl...
> Hi

> I am sending a number of emails (around 600) using the vb.net code below.
> The problem is that the emails end up in the OL2007 Outbox with a clock
> icon
> and do not go out. If I open one of the email items and click Send then
> that
> item goes out but this technique is too cumbersome for 600 or so emails.
> What is the problem and how can I fix it?

> Many Thanks

> Regards
>
 
J

John

Hi Ken

Sorry. Code is now below. I am not setting any delay as far as I can see,

unless something gets set by default in OL2007.

Many Thanks

Regards

Dim objOutlook As Object = CreateObject("Outlook.Application")

Dim NS As Object = objOutlook.GetNamespace("MAPI")

Dim objOutlookMsg As Object

Dim BodyText As String

Dim fso, ts

fso = CreateObject("Scripting.FileSystemObject")

ts = fso_OpenTextFile(Me.txtHtml.Text.ToString, 1)

BodyText = ts.ReadAll

NS.Logon()

While ....

' Create the message.

objOutlookMsg = objOutlook.CreateItem(0)

objOutlookMsg.To = "some address"

objOutlookMsg.Subject = "some subject"

objOutlookMsg.HTMLBody = BodyText

objOutlookMsg.send()

objOutlookMsg = Nothing

System.Windows.Forms.Application.DoEvents()

End While

NS.Logoff()

NS = Nothing

objOutlook = Nothing
<kenslovak@mvps.org> wrote in message

news:%234drw%23G5JHA.3544@TK2MSFTNGP04.phx.gbl...
> What code below?

> If you are setting a delayed sending time on the items that would account
> for what you see.

> >

>

> "John" <info@nospam.infovis.co.uk> wrote in message
> news:eGI0vsG5JHA.3476@TK2MSFTNGP05.phx.gbl...
> > Hi
>

>> I am sending a number of emails (around 600) using the vb.net code below.
> > The problem is that the emails end up in the OL2007 Outbox with a clock
> > icon
> > and do not go out. If I open one of the email items and click Send then
> > that
> > item goes out but this technique is too cumbersome for 600 or so emails.
> > What is the problem and how can I fix it?
>

>> Many Thanks
>

>> Regards
> >

>
 
S

Sue Mosher [MVP]

An Outlook rule can set a delay on outgoing items. Have you checked your

rules?

Sue Mosher

"John" <info@nospam.infovis.co.uk> wrote in message

news:uu%23v4OH5JHA.4672@TK2MSFTNGP05.phx.gbl...
> Hi Ken

> Sorry. Code is now below. I am not setting any delay as far as I can see,
> unless something gets set by default in OL2007.

> Many Thanks

> Regards

> Dim objOutlook As Object = CreateObject("Outlook.Application")
> Dim NS As Object = objOutlook.GetNamespace("MAPI")
> Dim objOutlookMsg As Object
> Dim BodyText As String
> Dim fso, ts

> fso = CreateObject("Scripting.FileSystemObject")
> ts = fso_OpenTextFile(Me.txtHtml.Text.ToString, 1)
> BodyText = ts.ReadAll

> NS.Logon()

> While ....
> ' Create the message.
> objOutlookMsg = objOutlook.CreateItem(0)
> objOutlookMsg.To = "some address"
> objOutlookMsg.Subject = "some subject"
> objOutlookMsg.HTMLBody = BodyText

> objOutlookMsg.send()

> objOutlookMsg = Nothing
> System.Windows.Forms.Application.DoEvents()
> End While

> NS.Logoff()
> NS = Nothing

> objOutlook = Nothing

> " - " <kenslovak@mvps.org> wrote in message
> news:%234drw%23G5JHA.3544@TK2MSFTNGP04.phx.gbl...
>

>> If you are setting a delayed sending time on the items that would account
> > for what you see.



> > "John" <info@nospam.infovis.co.uk> wrote in message
> > news:eGI0vsG5JHA.3476@TK2MSFTNGP05.phx.gbl...
> >> Hi
> >
>>> I am sending a number of emails (around 600) using the vb.net code
> >> below.
> >> The problem is that the emails end up in the OL2007 Outbox with a clock
> >> icon
> >> and do not go out. If I open one of the email items and click Send then
> >> that
> >> item goes out but this technique is too cumbersome for 600 or so emails.
> >> What is the problem and how can I fix it?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Close Oulook after sending emails via vba without outbox getting stuck. Outlook VBA and Custom Forms 1
B Recipient of a forwared message getting multiple emails Using Outlook 2
richardwing Outlook 365 VBA to access "Other Actions" menu for incoming emails in outlook Outlook VBA and Custom Forms 0
U Outlook on the iPhone cannot approve filtered Emails Using Outlook 0
K Outlook 365 After migrating to Outlook 365, some contacts display in emails with prefixes Using Outlook 1
B Move emails from one account to another Outlook VBA and Custom Forms 2
D Unable to view older emails in desktop app Using Outlook 0
S Outlook 365 Help me create a Macro to make some received emails into tasks? Outlook VBA and Custom Forms 1
R Outlook 2021 Having problem setting up outlook 2021 with windows 11. I have 3 gmail accounts and I want the 3 gmail, emails to merge into the same outlook input. Using Outlook.com accounts in Outlook 0
S Outlook 2021 Can you make emails from 3 word domains "safe" by entering top 2 word domain into Safe List in Outlook? Using Outlook 1
J Outlook 365 Emails showing as links and text only Using Outlook 4
G Removing old emails when adding accounts Using Outlook 3
N VBA Macro To Save Emails Outlook VBA and Custom Forms 1
Horsepower Lost emails Using Outlook 4
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2
M Saving emails using Visual Basic - Selecting folder with msoFileDialogFolderPicker Outlook VBA and Custom Forms 6
L Emails being archived when I press the A key accidentally - how do I stop this? Using Outlook 0
N Save emails within a certain date range to network drive Outlook VBA and Custom Forms 0
M I cant send emails via Outlook in my W10 PC. Using Outlook 3
e_a_g_l_e_p_i Can emails from Gmail be deleted when they are downloaded to Outlook 2010 Using Outlook 1
D Wrong email address in Outlook 2003 "From" tab in new outgoing emails Using Outlook 4
witzker How to find all emails from and to a contact in OL 2019 Using Outlook 6
S How to find emails that I sent that have not received a reply? Using Outlook 7
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
R Sent emails show iCloud mail account not the alias Using Outlook 2
K Run a script rule to auto 'send again' on undeliverable emails? Outlook VBA and Custom Forms 1
J how to stop junk emails from *.onmicrosoft.com ? Using Outlook 2
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
S Auto forward for multiple emails Outlook VBA and Custom Forms 0
M All fonts in Outlook emails display with exaggerated character spacing Using Outlook 4
L Images not displaying in emails sent to self Using Outlook 2
C Icons (arrows) not showing on emails forwarded or replied to Using Outlook 8
R Moved 6 months worth (approx 1500 emails) lost from moving from TPG inbox to Icloud inbox (folders) Using Outlook 3
U Approving Emails from iPhone Using Outlook 0
D cannot view emails in View pane (in the right pane), I only see one line or nothing Using Outlook 21
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
A Record opened emails for reopening later Using Outlook 2
Y Filter unread emails in a search folder vba help Outlook VBA and Custom Forms 0
S Outlook 2016 Change how Outlook shows me contacts in emails Using Outlook 0
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
B Outlook 2016 Outlook crashes when trying to print certain emails Using Outlook 5
L IMAP Emails Disappear Using Outlook 0
L Need help modifying a VBA script for emails stuck in Outbox Outlook VBA and Custom Forms 6
S Macro to extract and modify links from emails Outlook VBA and Custom Forms 3
D Duplicate Emails on Phone and Tablet Using Outlook 0
S Macro for Loop through outlook unread emails Outlook VBA and Custom Forms 2
Globalforester ItemAdd Macro - multiple emails Outlook VBA and Custom Forms 3
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3

Similar threads

Top