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
C Icons (arrows) not showing on emails forwarded or replied to Using Outlook 5
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
Horsepower Moving emails between folder Outlook for Mac Outlook Wishlist 8
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
P Forwarding emails issue with special characters replacing text body Using Outlook 1
B Emails get stuck in Outbox of Gmail IMAP in Outlook for Windows Using Outlook 0
C Multiple emails Using Outlook 8
Phillip Bit.ly emails Using Outlook 1
E Work uses live accounts for emails for all employees. Can we use the outlook calendar to give the employees an universal work schedule calendar? Using Outlook 1
G Alerting on missed emails in conversation Outlook VBA and Custom Forms 1
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
M Sync 'On my computer' emails Using Outlook 1
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 14
P Move emails between 2 mailboxes. Using Outlook 0
R Assign Categories "Round Robin" style but in a shared mailbox but on specific emails only Outlook VBA and Custom Forms 8
P Outlook for Mac - emails are not sent out beginning last week Using Outlook 1
M Missing emails in Inbox, but are present in webmail Using Outlook 0
A How To Get Body of All Emails to view in Blue Using Outlook 1
A How to get body of all emails in outlook 2016 to view in blue color Using Outlook 1
N Extract Outlook emails to excel Outlook VBA and Custom Forms 2
M Group of emails Using Outlook 1
I Saving attachments from multiple emails and updating file name Outlook VBA and Custom Forms 0
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
D Assign categories to outgoing emails Outlook VBA and Custom Forms 0
J Outlook 2016 Moving IMAP emails to Exchange Using Outlook 1
P Flagging emails in conversations Using Outlook 2
V Outlook 2016 will not move emails in search results Using Outlook 4
D Outlook 2016 Deleting emails without affecting folder structure - Outlook Office 365 Using Outlook 3
M Filter Conversations - Filter Out Single Emails Outlook VBA and Custom Forms 3
F not receiving emails until i re-login Using Outlook 2

Similar threads

Top