G
Guest
hi I have this code
MailMessage objEmail = new MailMessage();
objEmail.To = "(e-mail address removed)";
objEmail.From = "(e-mail address removed)";
objEmail.Cc = "(e-mail address removed)";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;
try
{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay
and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error
The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?
Regards
MailMessage objEmail = new MailMessage();
objEmail.To = "(e-mail address removed)";
objEmail.From = "(e-mail address removed)";
objEmail.Cc = "(e-mail address removed)";
objEmail.Subject = "Test Email";
objEmail.Body = "test" ;
objEmail.Priority = MailPriority.High;
//SmtpMail.SmtpServer =Request.ServerVariables["SERVER_NAME"].ToString() ;
try
{
SmtpMail.SmtpServer = "localhost"; //127.0.0.1 works too
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully -Thank You");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
and in iis I set relay for 127.0.0.1 and Allow all computers which
successfully authenticate to relay
and the IPaddress is all assigne if I change it to my ip addrees IOll have
this error
The transport failed to connect to the server.
ohter wise it doisent show any error and dosent sent any thing whats wrong?
Regards