0 votes
by (210 points)

When using the Rebex.Net.Ews.SendMessageAsync method against Exchange Online, it appears the message is most times not moved to the Sent Items folder.

I checked the documentation and nowhere it states explicitly that a message is actually moved to the Sent Items on sending. All I could find was https://www.rebex.net/secure-mail.net/features/ews-sending-emails.aspx#existing where it states: 'message is moved to "Sent Items" afterwards'.

Can someone confirm / deny a copy is saved?

If not saved, what steps should be taken to move the item after sending it? Basically the Rebex functionality counterpart of the Microsoft EWS SendAndSaveCopy ( https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.emailmessage.sendandsavecopy?view=exchange-ews-api )

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (15.2k points)

Hi,

All send methods of Rebex EWS client that do not use an EwsFolderId parameter instructs EWS server to save a mail message to Sent Items folder, e.g.

ews.SendMessageAsync(mail);

save that mail to Send Items. This behavior is the same as using an overload which uses EwsFolderId parameter, i.e.

ews.SendMessageAsync(mail, EwsFolderId.SentItems);

Using the overload this default behavior can be changed by specifying your custom folder, e.g you can save some mails to "Customer Invoces" folder, some mails to "Promotions" etc. You just need proper EwsFolderId and pass it to the method.
If you do not want to save your mail after it is sent, use the overload and specify null as that EwsFolderId parameter.

...