A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Outlook » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Emails getting stuck in Outbox



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2009, 11:36 PM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
John
external usenet poster
 
Posts: 308
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



  #2  
Old June 3rd, 2009, 02:21 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
Mike
external usenet poster
 
Posts: 1
Default Emails getting stuck in Outbox

I never used this MAPI object, but off the top of my head it sounds
like its not design to start the sending processing until you
explicitly tell its so. It would be kind of a waste to being sending
as you create each one. Queuing it first might allow it to
consolidate the messsges going to one particular host and do that with
one SMTP send call vs X amount.

So look for a method or idea that basically says:

NS.Send_the_stuff_I_Just_created()

object method or something you do after the loop and before you close,
or maybe a mail property per object that says "SendNow()"

Its what I would for if confronted with this.

--



John wrote:
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



  #3  
Old June 3rd, 2009, 04:27 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
Peter Foldes
external usenet poster
 
Posts: 3,300
Default Emails getting stuck in Outbox

John

Since ISP's put limits on how many you can send out a single ,daily,weekly , I
suggest you call your ISP for the limits that is imposed on your Outlook client with
your ISP

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"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




  #4  
Old June 3rd, 2009, 07:48 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
Cor Ligthert[MVP]
external usenet poster
 
Posts: 12
Default Emails getting stuck in Outbox

John,

Any reason why you want to use Mapi as SMTP is probably then as well
possible?

Cor

"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




  #5  
Old June 3rd, 2009, 08:05 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
John
external usenet poster
 
Posts: 308
Default Emails getting stuck in Outbox

Keeps record of emails sent in Outlook.

Thanks

Regards

"Cor Ligthert[MVP]" wrote in message
...
John,

Any reason why you want to use Mapi as SMTP is probably then as well
possible?

Cor

"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






  #6  
Old June 3rd, 2009, 08:31 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
Cor Ligthert[MVP]
external usenet poster
 
Posts: 12
Default Emails getting stuck in Outbox

With an Exchange Server or simply as a standalone?

"John" wrote in message
...
Keeps record of emails sent in Outlook.

Thanks

Regards

"Cor Ligthert[MVP]" wrote in message
...
John,

Any reason why you want to use Mapi as SMTP is probably then as well
possible?

Cor

"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







  #7  
Old June 3rd, 2009, 08:34 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook,microsoft.public.outlook.general
John
external usenet poster
 
Posts: 308
Default Emails getting stuck in Outbox

Both. We use one or the other depending on if it is to be sent from main
domain handled by exchange or auxiliary domains handled by outlook
standalone.

Regards

"Cor Ligthert[MVP]" wrote in message
...
With an Exchange Server or simply as a standalone?

"John" wrote in message
...
Keeps record of emails sent in Outlook.

Thanks

Regards

"Cor Ligthert[MVP]" wrote in message
...
John,

Any reason why you want to use Mapi as SMTP is probably then as well
possible?

Cor

"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









  #8  
Old June 3rd, 2009, 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: 17,338
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



 




Thread Tools
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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.