Smtp Object : DSN Method |
Visual Basic |
---|
Public Sub DSN( _ ByVal Notify As DsnConstants, _ Optional ByVal Segment As SegmentConstants = msgHeader, _ Optional ByVal EnvelopeId As String _ ) |
Value | Description |
---|---|
dsnDefault | Directs the server to follow its default policy for DSN. |
dsnDelay | Requests DSN for delayed delivery. |
dsnFailure | Requests DSN for failure of delivery. |
dsnFailureDelay | Requests DSN for failure or delay of delivery. |
dsnNever | Directs the server not to send DSN under any circumstances. |
dsnSuccess | Requests DSN for successful delivery. |
dsnSuccessDelay | Requests DSN for success for delay of delivery. |
dsnSuccessFailure | Requests DSN for success or Failure of delivery. |
dsnSuccessFailureDelay | Requests DSN for success, failure, or delay of delivery. |
Value | Description |
---|---|
msgHeader | Perform the operation on the header of the message. |
msgMessage | Perform the operation on the complete message. |
If EnvelopeId is provided, the value will be included in any returned messages by the addition of a header to the notification message of the form:
Original-Envelope-ID: <EnvelopeId>
Reserved characters contained in the EnvelopeId string are encoded before transmittal.
Refer to RFC 1891 for additional information about return notifications.
The following example code requests DSN for message delivery success and failure, requests return of the message, and provides an identifying label to aid in processing the return receipt:
Smtp1.DSN dsnSuccessFailure, msgMessage, "bounce-2118"