Mail Error

Discussion in 'ASP.NET 2.0' started by Takeshi Eto, Feb 20, 2007.

  1. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

  2. Hello i need send to mail with asp.net but i cant
    i use this code


    SmtpClient smtpClient = new SmtpClient();


    MailMessage message = new MailMessage();


    try


    {


    MailAddress fromAddress = new MailAddress("[email protected]");


    smtpClient.Host = "smtp.domain.com";


    message.From = fromAddress;


    message.To.Add(TextBox4.Text);


    message.Subject = "Uyelik";


    message.IsBodyHtml = false;


    message.Body = "Kullanici adiniz:" + TextBox4.Text + "Sifreniz:" + TextBox3.Text;


    smtpClient.Send(message);





    Label8.Text = "Uyelik isleminiz tamamlandi ve mail olarak yollandi!...";





    }


    catch (Exception ex)


    {


    Response.Write(ex.ToString());


    }


    but i have a this error


    System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated.
     

Share This Page