I'm trying to sending Email through my web application from Gmail
by using Sustem.Net.Mail.SmtpClient
My code is
string To = "doctor_ofvet@yahoo.com";
string From = "doctorofvet@gmail.com";
string Subject = "The Famous";
string Body = "Hello World";
SmtpClient Client = new SmtpClient();
Client.Send(From, To, Subject, Body);
I put this code in the web.config file
<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" port="465" userName="Gmail Username" password="Password"/>
</smtp>
</mailSettings>
</system.net>
but it did not success