using(SmtpClient client = new SmtpClient(\"smtp.gmail.com\", 587))
{
// Configure the client
client.EnableSsl = true;
client.UseDefaultCredentials = fal
Looks like there is a security issue with Gmail account.
I have also faced that same issue and then found solution from this post.
The post mentioned that you need to change the Account Permission setting with "Access of Less secure App" Enabled.
In fact you will get notification when you logged in to your gmail account.