A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Emails getting stuck in Outbox



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 2nd 09, 11:36 PM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
John[_11_]
external usenet poster
 
Posts: 83
Default Emails getting stuck in Outbox

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



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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Major flaw in Outlook 2007: emails stuck in outbox scorpionleather Outlook - General Queries 32 November 6th 08 12:36 PM
My emails are stuck in my outbox joewd1967 Outlook - General Queries 1 August 9th 08 04:28 PM
Emails stuck in Outbox Bernie Outlook - Using Contacts 7 June 23rd 07 11:08 AM
outlook 2003 emails getting stuck in the outbox AP Outlook - General Queries 1 March 7th 07 01:52 PM
Stuck in Outbox ? McHenry Outlook - General Queries 1 April 1st 06 05:48 AM


All times are GMT +1. The time now is 02:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.