PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Message queued in drafts and not outbox

Reply

Message queued in drafts and not outbox

 
Thread Tools Rate Thread
Old 31-05-2007, 05:01 PM   #1
JahMic
Guest
 
Posts: n/a
Default Message queued in drafts and not outbox


I've seen this written about a bit, but mostly in regards to
redemption.

For the new mail window, I add my own button and button handler,
upon the button click, I do the following:
OOMMailItem.Save
modify some properties via ex-mapi.
MAPIMessage.SaveChanges w/ KEEP_OPEN_READWRITE
MAPIMessage.SubmitMessage
MAPI.FlushQueues

Inspector.close w/ olDiscard.

I gather, doing the submit before the inspector is actually closed,
isn't good, but I'm not sure how to get message otherwise, especially
since as new message it doesn't have an entry id. Any suggestions for
improvement there?

The main issue is that the message is queued in the drafts folder and
not the outbox, causing some annoyment. How can I get this to be
queued in the outbox? I have tried OOMMailItem.move, but that will
just will makes the a copy as the mapi handler doesn't seem to get
know about the change, and the submitted message still goes through
the drafts.

Any help, much appreciated. J

  Reply With Quote
Old 31-05-2007, 06:22 PM   #2
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Message queued in drafts and not outbox

Do move the message first. Keep in mind that Move() returns the new message
(that is what your code needs to use). The old message must be immediatley
released.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"JahMic" <jahmic@gmail.com> wrote in message
news:1180627310.748568.320530@q19g2000prn.googlegroups.com...
> I've seen this written about a bit, but mostly in regards to
> redemption.
>
> For the new mail window, I add my own button and button handler,
> upon the button click, I do the following:
> OOMMailItem.Save
> modify some properties via ex-mapi.
> MAPIMessage.SaveChanges w/ KEEP_OPEN_READWRITE
> MAPIMessage.SubmitMessage
> MAPI.FlushQueues
>
> Inspector.close w/ olDiscard.
>
> I gather, doing the submit before the inspector is actually closed,
> isn't good, but I'm not sure how to get message otherwise, especially
> since as new message it doesn't have an entry id. Any suggestions for
> improvement there?
>
> The main issue is that the message is queued in the drafts folder and
> not the outbox, causing some annoyment. How can I get this to be
> queued in the outbox? I have tried OOMMailItem.move, but that will
> just will makes the a copy as the mapi handler doesn't seem to get
> know about the change, and the submitted message still goes through
> the drafts.
>
> Any help, much appreciated. J
>



  Reply With Quote
Old 01-06-2007, 03:43 PM   #3
JahMic
Guest
 
Posts: n/a
Default Re: Message queued in drafts and not outbox

That was it! I never occurred to me to check if there was a return
value from move.

Onwards, J

On Jun 1, 2:22 am, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> Do move the message first. Keep in mind that Move() returns the new message
> (that is what your code needs to use). The old message must be immediatley
> released.
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "JahMic" <jah...@gmail.com> wrote in message
>
> news:1180627310.748568.320530@q19g2000prn.googlegroups.com...
>
>
>
> > I've seen this written about a bit, but mostly in regards to
> > redemption.

>
> > For the new mail window, I add my own button and button handler,
> > upon the button click, I do the following:
> > OOMMailItem.Save
> > modify some properties via ex-mapi.
> > MAPIMessage.SaveChanges w/ KEEP_OPEN_READWRITE
> > MAPIMessage.SubmitMessage
> > MAPI.FlushQueues

>
> > Inspector.close w/ olDiscard.

>
> > I gather, doing the submit before the inspector is actually closed,
> > isn't good, but I'm not sure how to get message otherwise, especially
> > since as new message it doesn't have an entry id. Any suggestions for
> > improvement there?

>
> > The main issue is that the message is queued in the drafts folder and
> > not the outbox, causing some annoyment. How can I get this to be
> > queued in the outbox? I have tried OOMMailItem.move, but that will
> > just will makes the a copy as the mapi handler doesn't seem to get
> > know about the change, and the submitted message still goes through
> > the drafts.

>
> > Any help, much appreciated. J- Hide quoted text -

>
> - Show quoted text -



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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