ReturnPath Property

This property specifies the email address for delivery notification report.


Data Type: String


Remarks

The value specified by this property is used with SMTP "MAIL FROM" command during SMTP conversation, and the delivery notification report will be sent to this address. Most SMTP servers accept mail from all addresses. However, some SMTP servers use filter and will only accept email from specific senders.

If this property is not specified, the value of FromAddr property will be used in "MAIL FROM" command.

Usage Example:

[C#]
private void SendEmail()
{
  AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();
  oSmtp.ServerAddr = "mail.adminsystem.net";
  oSmtp.ReturnPath = "report@adminsystem.net";  
  oSmtp.FromAddr = "test@adminsystem.net";
  oSmtp.AddRecipient( "Support Team", "support@adminsystem.net", 0 );

  oSmtp.Subject = "Test";
  oSmtp.BodyText = "Hello, this is a test....";
  
  if( oSmtp.SendMail() == 0 )
    Console.WriteLine( "Message delivered!" );
  else
    Console.WriteLine( oSmtp.GetLastErrDescription());
}

See Also

FromAddr Property


2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.