SocksProxyUser Property

This property specifies the user for user authentication of proxy server.


Data Type: String

Remarks

If SocksProxyServer is not specified, the direct connection will be used; otherwise the proxy connection will be used. We don't suggest that you use the proxy server except it is your only choice.

Usage Example:

[Visual Basic]
Private Sub SendEmail()
  Dim oSmtp As AOSMTPLib.Mail
  Set oSmtp = New AOSMTPLib.Mail

  oSmtp.ServerAddr = "mail.adminsystem.net"
  oSmtp.FromAddr = "test@adminsystem.net"
  oSmtp.AddRecipient "Support Team", "support@adminsystem.net", 0

  oSmtp.SocksProxyServer = "192.168.0.1"
  oSmtp.SocksProxyPort = 1080
  ' if your proxy doesn't requires user authentication, please don't assign any value to 
  ' SocksProxyUser and SocksProxyPassword properties 
  oSmtp.SocksProxyUser = "tester"
  oSmtp.SocksProxyPassword = "pass"
  oSmtp.ProxyProtocol = 1 'socks5 proxy
        
  oSmtp.Subject = "Test"
  oSmtp.BodyText = "Hello, this is a test...."
 
  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
  Else
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub
[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.SocksProxyServer = "192.168.0.1";
  oSmtp.SocksProxyPort = 1080;
  // if your proxy doesn't requires user authentication, please don't assign any value to 
  // SocksProxyUser and SocksProxyPassword properties 
  oSmtp.SocksProxyUser = "tester";
  oSmtp.SocksProxyPassword = "pass";
  oSmtp.ProxyProtocol = 1; //socks5 proxy
  
  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

ProxyProtocol Property
SocksProxyPort Property
SocksProxyServer Property
SocksProxyPassword Property

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