0

I know how to send programmatically mails via shared mailbox in Outlook via Office.Interop. But still mail Ive sent is being stored in my personal sent items folder (instead of Shared Mailbox' Sent items). So other people cant see what was sent. Also it consumes my mailbox size quotas ...

Is there any way to send mails via Shared Mailbox and keep sent items there ? If not (so easy) than at least copy sent mail from my sent items folder top shared mailbox ?

* EDIT *

Below is my current code:

Application app = new Application(); MailItem mailItem = app.CreateItem(OlItemType.olMailItem); mailItem.Subject = subject; mailItem.To = to; mailItem.SentOnBehalfOfName = fromMail; // Send mailItem.Send(); 
3
  • Have you tried using SentOnBehalfOf or SendUsingAccount? Commented Nov 25, 2019 at 16:22
  • See following : social.msdn.microsoft.com/Forums/office/en-US/… Commented Nov 25, 2019 at 16:28
  • Im using SentOnBehalfOf . Never tried SendUsingAccount. Will check that ! Thanks Commented Nov 25, 2019 at 16:29

1 Answer 1

1

You just need to set the MailItem.SaveSentMessageFolder property which sets a Folder object that represents the folder in which a copy of the email message will be saved after being sent.

Be aware, the folder should be presented in your store. If you need to move the sent items I'd recommend handling the ItemAdd event on the folder (Sent Items by default) and move items programmatically by calling the Move method.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Eugene - this is what I was looking for!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.