This question might be silly.
I was searching other's threads about sending mail from asp.net and have been looking tutorials but still can't send it.
The codes are
MailAddress To = new MailAddress("TowhereIwanttosend@somewhere.com");
MailAddress From = new MailAddress(amazingsunday@sunday.com);
MailMessage Mailer = new MailMessage(From, To);
Mailer.Subject = "Testing";
Mailer.Body = "Just Testing";
SmtpClient Client = new SmtpClient();
Client.Host = "localhost";
Client.Send(Mailer);
Response.Write("Successful sent");
And This is the error
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first i34sm4652534wxd
What is wrong with the code? Maybe I'm not understanding what i'm doing .Will be appreciate if you help.