private void SendEmail() { System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(); System.Net.Mail.Attachment attach = new System.Net.Mail.Attachment(@"C:\MyFile\Instruction.txt"); mail.Attachments.Add(attach); mail.Body = ""; System.Net.Mail.MailAddress address = new System.Net.Mail.MailAddress("www.aligoglos@yahoo.com"); mail.To.Add(address); System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("localhost"); client.Send(mail); mail.Dispose(); MessageBox.Show("Email Sended"); }
System.Net.Mail.MailAddress fromAddress = new System.Net.Mail.MailAddress("test@yahoo.com"); mail.From.Add(fromAddress);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)