I want that when you click on the button, a certain text is sent to the mail. The compiler indicates that no exception was found. RRS feed

  • Question

  • User2032201178 posted

    private void buttonOtpreav_Click(object sender, EventArgs e)
    SmtpClient client = new SmtpClient("smtp.mail.ru", 587);
    client.Credentials = new NetworkCredential("...@yandex.ru", "Password");
    string from = "...@yandex.ru";
    string to = "...2@yandex.ru";
    string subject = "Header";
    string text = "Text............";

    Tuesday, April 28, 2020 2:49 PM

All replies