Is there any way to avoid this, other can copying entire stream to buffer, before passing it to MailMessage.Load?
You can disable closing the input stream by enabling the DoNotCloseStreamAfterLoad option:
DoNotCloseStreamAfterLoad
var mail = new MailMessage(); mail.Options |= MimeOptions.DoNotCloseStreamAfterLoad; mail.Load(input);
Welcome to Q&A forum for C# and VB.NET developers working with following .NET components:
Applications:
If you need immediate assistance, please contact us directly.