c# - Send mail from asp.net application by unblocking gmail latest security technique -


I am developing a registration form in asp.net c #. When clicking on the submit button, I want to send an email to the registered Gmail account of the customer registered with my Gmail account. But when I tried, coming in the form of a security mail "

Hi *****, we recently attempted sign-in for my Google account [jijosanthigiri@gmail.com] Sign In Trying Detail Date & Amp; Time: Friday, 10 October 2014 5:51:05 PM UTC Location: India If it was not, please review your Account Activity page ****** Whatever your attempt to sign in to your account, it will be your password. We recommend that you change it immediately. If it was you, you can switch to an app made by Google such as your account (recommended) to Gmail, so that your account is now equipped with modern security Sincerely, The Google Accounts Team

"My code is as follows:

  MailMessage MyMailMessage = new MailMessage (); SmtpClient SMTPServer = New SmtpClient ("smtp.gmail.com"); SMTPServer.Credentials = New network credentials ("7878@gmail.com", "*******"); MyMailMessage.From = New Mail Address ("7878@gmail.com"); MyMailMessage.To.Add ("123@gmail.com"); MyMailMessage.Subject = "Test Forms"; MyMailMessage.IsBodyHtml = True; MyMailMessage.Body = "Email Nokan"; SMTPServer.DeliveryMethod = SmtpDeliveryMethod.Network; SMTPServer.UseDefaultCredentials = false; SMTPServer.Port = 25; SMTPServer.EnableSsl = true; Try {SMTPServer.Send (MyMailMessage); Lblstat.Text = "OK"; } Hold (Exception Pre) {}   

I made a mistake, but did not make a right solution to block the customer's Gmail account without entering it. Please try to delete where the SMTP port is being set, please help and thanks in advance

Does not use SSL port 25

'On SMTPPower Port = 25;

Thanks

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -