Reputation: 10805
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();
Upvotes: 0
Views: 2017
Reputation: 49395
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.
Upvotes: 1