Visual Studio 2012, 2013, 2015 C# and VB NET Tutorial Flat Design Contact Us - Send Mail

Опубликовано: 24 Апрель 2026
на канале: Satya Achmad
3,600
44

set off :
https://www.google.com/settings/u/1/s...

source code :
using System.Net.Mail;

button send:
try
{
MailMessage mail = new MailMessage();
SmtpClient smtpserver = new SmtpClient("smtp.gmail.com");

mail.From = new MailAddress("[email protected]");
mail.IsBodyHtml = true;
mail.To.Add(textBox1.Text);
mail.Subject = "From "+textBox2.Text;
mail.Body = textBox3.Text;
smtpserver.Port = 587;
smtpserver.Credentials = new System.Net.NetworkCredential("your email", "password");
smtpserver.EnableSsl = true;
smtpserver.Send(mail);
MessageBox.Show("Mail send");

}
catch (Exception)
{
return;
}

----------------------------------------------------------------------------------------------------------
Tutorial flat design :
----------------------------------------------------------------------------------------------------------
video 1 :    • Visual Studio 2012, 2013, 2015 C# and VB N...  
video 2 :    • VIsual studio 2015 Flat Design Form Login ...