I'm trying to send multiple email using a gmail email.
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("gmail email ssl server");
mail.To.Add("email to send to");
mail.Subject = "Test Mail 2.0";
mail.IsBodyHtml = true;
mail.Body = body;
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("email@email.com", "My Password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
It's working well, but as you already know, C# code is retrievable. Do you know a crypted method that gmail will accept as password. So i can store in the code, only the crypted password, my email will still be vulnerable, but a lot less than right now.