SocksProxyServer Property


This property indicates the proxy server address.

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.

Example

[Visual Basic] To get the full samples of EASendMail, please refer to Samples section.

[VB6, VBA - Send Email via Socks4, Socks5, HTTP Proxy Server]   
Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail
 
  oSmtp.LicenseCode = "TryIt"

  oSmtp.ServerAddr = "mail.emailarchitect.net"
  oSmtp.FromAddr = "test@emailarchitect.net"
  oSmtp.AddRecipient "Support Team", "support@emailarchitect.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 email from proxy server"
  oSmtp.BodyText = "Hello, this is a test...."
 
  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
  Else
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub

[ASP, VBScript - Send Email via Socks4, Socks5, HTTP Proxy Server]   
  Dim oSmtp
  Set oSmtp = Server.CreateObject("EASendMailObj.Mail")
 
  oSmtp.LicenseCode = "TryIt"

  oSmtp.ServerAddr = "mail.emailarchitect.net"
  oSmtp.FromAddr = "test@emailarchitect.net"
  oSmtp.AddRecipient "Support Team", "support@emailarchitect.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 email from proxy server"
  oSmtp.BodyText = "Hello, this is a test...."
 
  If oSmtp.SendMail() = 0 Then
    Response.Write "Message delivered!"
  Else
    Response.Write oSmtp.GetLastErrDescription()
  End If

See Also

Bulk Email Sender Guidelines
ProxyProtocol Property
SocksProxyPort Property
SocksProxyUser Property
SocksProxyPassword Property