Gets or sets the local binded IP address for sending email.
[VisualĀ Basic] Public Property BindEndPoint As System.NET.EndPoint
[C#]
public System.NET.EndPoint BindEndPoint {get; set;}
[C++] public: __property System.NET.EndPoint* get_BindEndPoint(); public: __property void set_BindEndPoint(System.NET.EndPoint*);
[JScript] public function get BindEndPoint() : System.NET.EndPoint; public function set BindEndPoint(System.NET.EndPoint);
Property Value
Remarks
Example
[Visual Basic] To get the full samples of EASendMail, please refer to Samples section.
[Visual Basic]
Imports EASendMail
Imports System.Net
Sub SendMail()
Dim oMail As SmtpMail = New SmtpMail("TryIt")
Dim oSmtp As SmtpClient = New SmtpClient
Try
Dim oServer As SmtpServer = New SmtpServer("myserveraddress")
oMail.From = New MailAddress("from@adminsystem.com")
oMail.To.Add(New MailAddress("to@adminsystem.com"))
oMail.Subject = "test subject"
oMail.TextBody = "test body"
oSmtp.BindEndPoint = New IPEndPoint(IPAddress.Parse("192.168.0.1"), 0 )
oSmtp.SendMail( oServer, oMail )
Console.WriteLine( "message was sent" )
Catch exp As SmtpTerminatedException
Console.WriteLine(exp.Message)
Catch exp As SmtpServerException
Console.WriteLine("Exception: Server Respond: {0}", exp.ErrorMessage)
Catch exp As System.Net.Sockets.SocketException
Console.WriteLine("Exception: Networking Error: {0} {1}", exp.ErrorCode, exp.Message)
Catch exp As System.ComponentModel.Win32Exception
Console.WriteLine("Exception: System Error: {0} {1}", exp.ErrorCode, exp.Message)
Catch exp As System.Exception
Console.WriteLine("Exception: Common: {0}", exp.Message)
End Try
Console.WriteLine("SMTP LOG:" & vbCrLf)
Console.WriteLine(oSmtp.SmtpConversation)
End Sub