this problem
Required settings can be used by specifying the mail server for the IP address
SMTP-> Properties-> Access-> relay
Add the ip address
Public Bool Send (String to, String from, String Subject, String Message)
{
Try
{
MailMessage EM = New MailMessage ();
Em.to = TO;
Em.from = from;
Em.subject = Subject;
Em.body = message;
// Found Out How To Send Authenticated Email Via System.Web.mail At http://systemwebmail.com (Fact 3.8)
IF (this.username! = null& this.password! = null)
{
Em.fields.add ("http://schemas.microsoft.com/cdpo/configuration/smtpauthenticate", "1"); // Basic Authentication
Em.fields.add ("http://schemas.microsoft.com/cdpo/configuration/sendusername", this.username); // set your username here
Em.fields.add ("http://schemas.microsoft.com/cdo/configuration/sendpassword", this.password); // set your password here
}
SMTPMAIL.SMTPSERVER = this.smtpserver;
SMTPMAIL.SEND (EM);
Return True;
}
Catch
{
Return False;
}
}
}
}