Dart.Mail Namespace > Smtp Class : DeliveryStatusNotification Property |
Public Property DeliveryStatusNotification As DeliveryStatusNotification
Dim instance As Smtp Dim value As DeliveryStatusNotification instance.DeliveryStatusNotification = value value = instance.DeliveryStatusNotification
public DeliveryStatusNotification DeliveryStatusNotification {get; set;}
public: __property DeliveryStatusNotification* get_DeliveryStatusNotification(); public: __property void set_DeliveryStatusNotification( DeliveryStatusNotification* value );
public: property DeliveryStatusNotification^ DeliveryStatusNotification { DeliveryStatusNotification^ get(); void set ( DeliveryStatusNotification^ value); }
using System.Net.Mail; private void sendWithDsn() { //Specify a DSN ID to use smtp1.DeliveryStatusNotification.EnvelopeID = "ID1234567"; //Return the entire message instead of the headers smtp1.DeliveryStatusNotification.ReturnMessage = true; //Send a DSN on failure or delay smtp1.DeliveryStatusNotification.Options = DeliveryNotificationOptions.Delay | DeliveryNotificationOptions.OnFailure; //Send a message smtp1.Session.RemoteEndPoint = new IPEndPoint(myServer, Smtp.GetDefaultPort(smtp1.Session)); smtp1.Session.Username = myUsername; smtp1.Session.Password = myPassword; smtp1.Send(toAddress, fromAddress, "Test", "Test Message."); //Gracefully logout smtp1.Close(); }
Imports System.Net.Mail Private Sub sendWithDsn() 'Specify a DSN ID to use smtp1.DeliveryStatusNotification.EnvelopeID = "ID1234567" 'Return the entire message instead of the headers smtp1.DeliveryStatusNotification.ReturnMessage = True 'Send a DSN on failure or delay smtp1.DeliveryStatusNotification.Options = DeliveryNotificationOptions.Delay Or DeliveryNotificationOptions.OnFailure 'Send a message smtp1.Session.RemoteEndPoint = New IPEndPoint(myServer, Smtp.GetDefaultPort(smtp1.Session)) smtp1.Session.Username = myUsername smtp1.Session.Password = myPassword smtp1.Send(toAddress, fromAddress, "Test", "Test Message.") 'Gracefully logout smtp1.Close() End Sub