Dart.Mail Namespace > MailMessage Class > Save Method : Save(Stream) Method |
Public Overloads Sub Save( _ ByVal encodedStream As Stream _ )
Dim instance As MailMessage Dim encodedStream As Stream instance.Save(encodedStream)
public void Save( Stream encodedStream )
public: void Save( Stream* encodedStream )
public: void Save( Stream^ encodedStream )
Exception | Description |
---|---|
System.UnauthorizedAccessException | This usually indicates that an antivirus has quarantined or blocked access to a decoded attachment on disk. Set DecodeToMemory to true to decode attachments to memory instead of to disk to circumvent your antivirus. Alternatively, test each attachment with Attachment.Content.OpenRead() and remove any attachments that throw an exception. |
System.IO.FileNotFoundException | This usually indicates that an antivirus has quarantined or blocked access to a decoded attachment on disk. Set DecodeToMemory to true to decode attachments to memory instead of to disk to circumvent your antivirus. Alternatively, test each attachment with Attachment.Content.OpenRead() and remove any attachments that throw an exception. |
The caller is responsible for opening and closing encodedStream.
Saving a MailMessage with this method will include the Bcc field, which should not be included in messages sent to a server. To output the MailMessage as it would be sent to a server, use MailMessage.GetEncodingStream().