MailBee.NET Objects 7.2

DsnAttachment Constructor 

Creates a new instance of DsnAttachment class from the specified attachment.

public DsnAttachment(
   Attachment dsnAttach,
   Encoding enc
);

Parameters

dsnAttach
The attachment containing DSN data.
enc
The encoding to use for decoding the attachment data from bytes to strings. If a null reference (Nothing in Visual Basic), the encoding will be determined from the attachment header (Attachment.AsMimePart.Charset).

Remarks

This constructor is useful if you need to create DsnAttachment object from arbitrary data, not from MailMessage object. See DsnAttachment class description for details.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException dsnAttach is a null reference or its Content-Type is not "message/delivery-status" (not a DSN).

See Also

DsnAttachment Class | MailBee.BounceMail Namespace