FromAddr Property

This property specifies the sender's email address.


Data Type: String


Remarks

This property is required to send mail. The value specified by this property is used with SMTP "MAIL FROM" command during SMTP conversation. Most SMTP servers accept mail from all addresses. However, some SMTP servers use filter and will only accept email from specific senders.

Usage Example:

[C#]
private void SendEmail()
{
  AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();
  oSmtp.ServerAddr = "mail.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

From Property


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