Exclude Message Content and Attachments from Aspose.Email SMTP Logs

Hello,

I would like to know if it’s possible to prevent the message body and attachment files from being included in the SMTP logs when sending emails using Aspose.Email for .NET.

This is important for us due to privacy and data protection requirements.

Is there a way to achieve this with Aspose.Email? If so, could you please advise on how to configure it?

Thank you in advance.

Hello @blo,

If you do enable logging, full SMTP conversation, including the message content (body and attachments), may be written to the log. This is because the SMTP protocol transmits the entire message as part of the session.
If SMTP logging is only needed for debugging, we recommend enabling it temporarily and only in controlled environments.