none
Bypass outbox in outlook RRS feed

  • Question

  • Hi

    I am sending mail through VBA code. Is there any way to bypass outbox ie the mail should not go in outbox.

    Tuesday, February 23, 2016 2:00 PM

Answers

All replies

  • Hi

    I am sending mail through VBA code. Is there any way to bypass outbox ie the mail should not go in outbox.


    Is Outlook connected to a mail server at the time that messages are parked in the Outbox?
    Tuesday, February 23, 2016 2:13 PM
  • Hello,

    The DeleteAfterSubmit property of the MailItem class allows to set a Boolean value that is True if a copy of the mail message is not saved upon being sent, and False if a copy is saved. So, if you set this property to true before calling the Send method, the sent item will not be saved to Sent Items folder.

    If you want to avoid any UI interactions you will have to use a low-level API - Extended MAPI or any other third party wrappers around that API (for example, Redemption). Also you may consider using EWS in case of Exchange accounts, see EWS Managed API, EWS, and web services in Exchange for more information.


    • Edited by Eugene Astafiev Tuesday, February 23, 2016 2:38 PM Exchange server options
    Tuesday, February 23, 2016 2:37 PM
  • Yes it is connected. the requirement is that the mail which is being sent by the code should be invisible. i am deleting it from the sent folder but it it appears in out box, even for a while. that should also not happen.
    Tuesday, February 23, 2016 4:50 PM
  • It would be helpful if you posted the code that you are using.  Also, what version of Outlook?

    Tuesday, February 23, 2016 5:41 PM
  • The Outlook object model doesn't provide any property or method for preventing emails from appearing in the Outbox folder. 

    If you need to avoid any UI interactions you will have to use a low-level API - Extended MAPI or any other third party wrappers around that API (for example, Redemption). Also you may consider using EWS in case of Exchange accounts, see EWS Managed API, EWS, and web services in Exchange for more information.

    Tuesday, February 23, 2016 9:04 PM