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 and VBA
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
  #1  
Old June 3rd 09, 01:08 PM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general,microsoft.public.outlook.program_vba
Diane Poremsky [MVP]
external usenet poster
 
Posts: 12,991
Default Emails getting stuck in Outbox

You should be posting this to the outlook.program_vba group - the outlook
developers don't usually visit the general groups.

--
Diane Poremsky [MVP - Outlook]
Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com

Outlook Tips by email:


EMO - a weekly newsletter about Outlook and Exchange:


You can access this newsgroup by visiting
http://www.microsoft.com/office/comm...s/default.mspx or point your
newsreader to msnews.microsoft.com.


"John" wrote in message
...
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



Ads
 




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
Emails getting stuck in Outbox John[_11_] Outlook - General Queries 7 June 3rd 09 01:08 PM
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


All times are GMT +1. The time now is 02:41 AM.


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.