1

Topic: Kirim email SMTP degan C# menggunakan System.Web.Mail

this the simple way to create Mail Application, using the namespace System.Web.Mail

source

System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
mail.To = "test@xxx.com";
mail.From = "me@xxx.com";
mail.CC = "";
mail.Subject = "email subject";
mail.Body = "email content";
mail.Attachments.Add(new System.Net.Mail.Attachment(@"D:\test.txt"));
System.Web.Mail.SmtpMail.SmtpServer = "localhost";
System.Web.Mail.SmtpMail.Send(mail);