Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Sending MailItems from Outbox part 2

Geek News

Sending MailItems from Outbox part 2
Tom at GSD 9/14/2006 1:35:02 PM
Hi,

Summary - I am having an issue where Outlook 2003 will not send or will send
duplicate emails when programmatically sending emails that are in the outbox.

My add-in will move several personalized Mail Items to the Outbox (could be
up to 500). The idea is that the addin will send all of these messages out. I
have created an event driven process that will send one email at a time from
the Outbox. We have to do this because if we have a loop and send all
messages at one time several messages are dropped because Outlook and
antivirus software cannot handle the rate at which we are sending the emails.
So what I am doing is sending one mail item, setting an event so that we give
Outlook time to process the send and then sending another mailitem. I repeat
this process until all of the messages have been processed. The problem is
that some of the messages are sent twice and some are lost after the send
method is invoked and in some cases the messages are stuck in the Outbox
after send. Is there a way to insure that the sending of the mailitem is
fully processed before another mailitem is sent? Is there any other way to
check to see if the email is fully processed? I have tried keeping track of
the entry ID's but something is not correct with the entry id's and I am not
sure what the issue is - it almost seems that the ID's are not unique. Any
suggestions would be greatly appreciated. Thank you.

Re: Sending MailItems from Outbox part 2
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 9/14/2006 2:14:29 PM
[Quoted Text]
> Is there a way to insure that the sending of the mailitem is
> fully processed before another mailitem is sent?

What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
> Hi,
>
> Summary - I am having an issue where Outlook 2003 will not send or will send
> duplicate emails when programmatically sending emails that are in the outbox.
>
> My add-in will move several personalized Mail Items to the Outbox (could be
> up to 500). The idea is that the addin will send all of these messages out. I
> have created an event driven process that will send one email at a time from
> the Outbox. We have to do this because if we have a loop and send all
> messages at one time several messages are dropped because Outlook and
> antivirus software cannot handle the rate at which we are sending the emails.
> So what I am doing is sending one mail item, setting an event so that we give
> Outlook time to process the send and then sending another mailitem. I repeat
> this process until all of the messages have been processed. The problem is
> that some of the messages are sent twice and some are lost after the send
> method is invoked and in some cases the messages are stuck in the Outbox
> after send. Is there a way to insure that the sending of the mailitem is
> fully processed before another mailitem is sent? Is there any other way to
> check to see if the email is fully processed? I have tried keeping track of
> the entry ID's but something is not correct with the entry id's and I am not
> sure what the issue is - it almost seems that the ID's are not unique. Any
> suggestions would be greatly appreciated. Thank you.
>
Re: Sending MailItems from Outbox part 2
Tom at GSD 9/14/2006 2:28:02 PM
Thanks for your reply.

I thought about that, but I am curious if the item is completely sent when
this event is fired? It seems as though we are dealing with some sort of
latent timing issue. Is this event sent when the item has completely been
processed? Also how does the entry ID compare from the Outbox to the Sent
items? Is seems as though there are some differences that I have noted.


"Sue Mosher [MVP-Outlook]" wrote:

[Quoted Text]
> > Is there a way to insure that the sending of the mailitem is
> > fully processed before another mailitem is sent?
>
> What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
> > Hi,
> >
> > Summary - I am having an issue where Outlook 2003 will not send or will send
> > duplicate emails when programmatically sending emails that are in the outbox.
> >
> > My add-in will move several personalized Mail Items to the Outbox (could be
> > up to 500). The idea is that the addin will send all of these messages out. I
> > have created an event driven process that will send one email at a time from
> > the Outbox. We have to do this because if we have a loop and send all
> > messages at one time several messages are dropped because Outlook and
> > antivirus software cannot handle the rate at which we are sending the emails.
> > So what I am doing is sending one mail item, setting an event so that we give
> > Outlook time to process the send and then sending another mailitem. I repeat
> > this process until all of the messages have been processed. The problem is
> > that some of the messages are sent twice and some are lost after the send
> > method is invoked and in some cases the messages are stuck in the Outbox
> > after send. Is there a way to insure that the sending of the mailitem is
> > fully processed before another mailitem is sent? Is there any other way to
> > check to see if the email is fully processed? I have tried keeping track of
> > the entry ID's but something is not correct with the entry id's and I am not
> > sure what the issue is - it almost seems that the ID's are not unique. Any
> > suggestions would be greatly appreciated. Thank you.
> >
>
Re: Sending MailItems from Outbox part 2
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 9/14/2006 2:33:49 PM
Correct. The item should not hit the Sent Items folder until the process of delivering the item to the mail server has completed.

There is no corrrelation between the EntryID of an item in the Outbox and the EntryID of the corresponding item in the Sent Items folder.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:0C4916B8-A343-4FC5-9916-0ABFDD9A2421[ at ]microsoft.com...
[Quoted Text]
> Thanks for your reply.
>
> I thought about that, but I am curious if the item is completely sent when
> this event is fired? It seems as though we are dealing with some sort of
> latent timing issue. Is this event sent when the item has completely been
> processed? Also how does the entry ID compare from the Outbox to the Sent
> items? Is seems as though there are some differences that I have noted.
>
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> > Is there a way to insure that the sending of the mailitem is
>> > fully processed before another mailitem is sent?
>>
>> What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?
>>
>> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
>> > Hi,
>> >
>> > Summary - I am having an issue where Outlook 2003 will not send or will send
>> > duplicate emails when programmatically sending emails that are in the outbox.
>> >
>> > My add-in will move several personalized Mail Items to the Outbox (could be
>> > up to 500). The idea is that the addin will send all of these messages out. I
>> > have created an event driven process that will send one email at a time from
>> > the Outbox. We have to do this because if we have a loop and send all
>> > messages at one time several messages are dropped because Outlook and
>> > antivirus software cannot handle the rate at which we are sending the emails.
>> > So what I am doing is sending one mail item, setting an event so that we give
>> > Outlook time to process the send and then sending another mailitem. I repeat
>> > this process until all of the messages have been processed. The problem is
>> > that some of the messages are sent twice and some are lost after the send
>> > method is invoked and in some cases the messages are stuck in the Outbox
>> > after send. Is there a way to insure that the sending of the mailitem is
>> > fully processed before another mailitem is sent? Is there any other way to
>> > check to see if the email is fully processed? I have tried keeping track of
>> > the entry ID's but something is not correct with the entry id's and I am not
>> > sure what the issue is - it almost seems that the ID's are not unique. Any
>> > suggestions would be greatly appreciated. Thank you.
>> >
>>
Re: Sending MailItems from Outbox part 2
Tom at GSD 9/14/2006 2:46:02 PM
Thank you.

So there is not anyway to compare emails from folder to folder. I guess I
could hide a specific HTML element with a GUID to make sure that each message
has been sent.

Thanks again for your time.

"Sue Mosher [MVP-Outlook]" wrote:

[Quoted Text]
> Correct. The item should not hit the Sent Items folder until the process of delivering the item to the mail server has completed.
>
> There is no corrrelation between the EntryID of an item in the Outbox and the EntryID of the corresponding item in the Sent Items folder.
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:0C4916B8-A343-4FC5-9916-0ABFDD9A2421[ at ]microsoft.com...
> > Thanks for your reply.
> >
> > I thought about that, but I am curious if the item is completely sent when
> > this event is fired? It seems as though we are dealing with some sort of
> > latent timing issue. Is this event sent when the item has completely been
> > processed? Also how does the entry ID compare from the Outbox to the Sent
> > items? Is seems as though there are some differences that I have noted.
> >
> >
> > "Sue Mosher [MVP-Outlook]" wrote:
> >
> >> > Is there a way to insure that the sending of the mailitem is
> >> > fully processed before another mailitem is sent?
> >>
> >> What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?
> >>
> >> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
> >> > Hi,
> >> >
> >> > Summary - I am having an issue where Outlook 2003 will not send or will send
> >> > duplicate emails when programmatically sending emails that are in the outbox.
> >> >
> >> > My add-in will move several personalized Mail Items to the Outbox (could be
> >> > up to 500). The idea is that the addin will send all of these messages out. I
> >> > have created an event driven process that will send one email at a time from
> >> > the Outbox. We have to do this because if we have a loop and send all
> >> > messages at one time several messages are dropped because Outlook and
> >> > antivirus software cannot handle the rate at which we are sending the emails.
> >> > So what I am doing is sending one mail item, setting an event so that we give
> >> > Outlook time to process the send and then sending another mailitem. I repeat
> >> > this process until all of the messages have been processed. The problem is
> >> > that some of the messages are sent twice and some are lost after the send
> >> > method is invoked and in some cases the messages are stuck in the Outbox
> >> > after send. Is there a way to insure that the sending of the mailitem is
> >> > fully processed before another mailitem is sent? Is there any other way to
> >> > check to see if the email is fully processed? I have tried keeping track of
> >> > the entry ID's but something is not correct with the entry id's and I am not
> >> > sure what the issue is - it almost seems that the ID's are not unique. Any
> >> > suggestions would be greatly appreciated. Thank you.
> >> >
> >>
>
Re: Sending MailItems from Outbox part 2
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 9/14/2006 3:53:45 PM
Or fill the built-in BillingInformation property with a GUID value.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:9E2EAD71-8C34-4309-8C3B-602787813A63[ at ]microsoft.com...
[Quoted Text]
> Thank you.
>
> So there is not anyway to compare emails from folder to folder. I guess I
> could hide a specific HTML element with a GUID to make sure that each message
> has been sent.
>
> Thanks again for your time.
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> Correct. The item should not hit the Sent Items folder until the process of delivering the item to the mail server has completed.
>>
>> There is no corrrelation between the EntryID of an item in the Outbox and the EntryID of the corresponding item in the Sent Items folder.

>>
>> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:0C4916B8-A343-4FC5-9916-0ABFDD9A2421[ at ]microsoft.com...
>> > Thanks for your reply.
>> >
>> > I thought about that, but I am curious if the item is completely sent when
>> > this event is fired? It seems as though we are dealing with some sort of
>> > latent timing issue. Is this event sent when the item has completely been
>> > processed? Also how does the entry ID compare from the Outbox to the Sent
>> > items? Is seems as though there are some differences that I have noted.
>> >
>> >
>> > "Sue Mosher [MVP-Outlook]" wrote:
>> >
>> >> > Is there a way to insure that the sending of the mailitem is
>> >> > fully processed before another mailitem is sent?
>> >>
>> >> What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?
>> >>
>> >> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
>> >> > Hi,
>> >> >
>> >> > Summary - I am having an issue where Outlook 2003 will not send or will send
>> >> > duplicate emails when programmatically sending emails that are in the outbox.
>> >> >
>> >> > My add-in will move several personalized Mail Items to the Outbox (could be
>> >> > up to 500). The idea is that the addin will send all of these messages out. I
>> >> > have created an event driven process that will send one email at a time from
>> >> > the Outbox. We have to do this because if we have a loop and send all
>> >> > messages at one time several messages are dropped because Outlook and
>> >> > antivirus software cannot handle the rate at which we are sending the emails.
>> >> > So what I am doing is sending one mail item, setting an event so that we give
>> >> > Outlook time to process the send and then sending another mailitem. I repeat
>> >> > this process until all of the messages have been processed. The problem is
>> >> > that some of the messages are sent twice and some are lost after the send
>> >> > method is invoked and in some cases the messages are stuck in the Outbox
>> >> > after send. Is there a way to insure that the sending of the mailitem is
>> >> > fully processed before another mailitem is sent? Is there any other way to
>> >> > check to see if the email is fully processed? I have tried keeping track of
>> >> > the entry ID's but something is not correct with the entry id's and I am not
>> >> > sure what the issue is - it almost seems that the ID's are not unique. Any
>> >> > suggestions would be greatly appreciated. Thank you.
>> >> >
>> >>
>>
Re: Sending MailItems from Outbox part 2
Tom at GSD 9/14/2006 5:42:02 PM
Excellent idea! Thanks!!!

"Sue Mosher [MVP-Outlook]" wrote:

[Quoted Text]
> Or fill the built-in BillingInformation property with a GUID value.
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:9E2EAD71-8C34-4309-8C3B-602787813A63[ at ]microsoft.com...
> > Thank you.
> >
> > So there is not anyway to compare emails from folder to folder. I guess I
> > could hide a specific HTML element with a GUID to make sure that each message
> > has been sent.
> >
> > Thanks again for your time.
> >
> > "Sue Mosher [MVP-Outlook]" wrote:
> >
> >> Correct. The item should not hit the Sent Items folder until the process of delivering the item to the mail server has completed.
> >>
> >> There is no corrrelation between the EntryID of an item in the Outbox and the EntryID of the corresponding item in the Sent Items folder.
>
> >>
> >> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:0C4916B8-A343-4FC5-9916-0ABFDD9A2421[ at ]microsoft.com...
> >> > Thanks for your reply.
> >> >
> >> > I thought about that, but I am curious if the item is completely sent when
> >> > this event is fired? It seems as though we are dealing with some sort of
> >> > latent timing issue. Is this event sent when the item has completely been
> >> > processed? Also how does the entry ID compare from the Outbox to the Sent
> >> > items? Is seems as though there are some differences that I have noted.
> >> >
> >> >
> >> > "Sue Mosher [MVP-Outlook]" wrote:
> >> >
> >> >> > Is there a way to insure that the sending of the mailitem is
> >> >> > fully processed before another mailitem is sent?
> >> >>
> >> >> What about waiting for the ItemAdd event to fire on the Sent Items folder's Items collection?
> >> >>
> >> >> "Tom at GSD" <TomatGSD[ at ]discussions.microsoft.com> wrote in message news:1C47122D-7672-4208-95D1-26F81D8671E5[ at ]microsoft.com...
> >> >> > Hi,
> >> >> >
> >> >> > Summary - I am having an issue where Outlook 2003 will not send or will send
> >> >> > duplicate emails when programmatically sending emails that are in the outbox.
> >> >> >
> >> >> > My add-in will move several personalized Mail Items to the Outbox (could be
> >> >> > up to 500). The idea is that the addin will send all of these messages out. I
> >> >> > have created an event driven process that will send one email at a time from
> >> >> > the Outbox. We have to do this because if we have a loop and send all
> >> >> > messages at one time several messages are dropped because Outlook and
> >> >> > antivirus software cannot handle the rate at which we are sending the emails.
> >> >> > So what I am doing is sending one mail item, setting an event so that we give
> >> >> > Outlook time to process the send and then sending another mailitem. I repeat
> >> >> > this process until all of the messages have been processed. The problem is
> >> >> > that some of the messages are sent twice and some are lost after the send
> >> >> > method is invoked and in some cases the messages are stuck in the Outbox
> >> >> > after send. Is there a way to insure that the sending of the mailitem is
> >> >> > fully processed before another mailitem is sent? Is there any other way to
> >> >> > check to see if the email is fully processed? I have tried keeping track of
> >> >> > the entry ID's but something is not correct with the entry id's and I am not
> >> >> > sure what the issue is - it almost seems that the ID's are not unique. Any
> >> >> > suggestions would be greatly appreciated. Thank you.
> >> >> >
> >> >>
> >>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net