SmtpClient oSmtpClient = new SmtpClient();
oSmtpClient.Host = "smtp.gmail.com"; //The Outgoing mail server
oSmtpClient.Credentials = new NetworkCredential("Your Email", "Your password");
oSmtpClient.Port = 587;
oSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
oSmtpClient.EnableSsl = true;
MailMessage msg = new MailMessage("Email From", "Email To");
msg.Subject = "Subject goes here";
msg.Body = "Body goes here";
oSmtpClient.Send(msg);
Source: https://www.nilebits.com/blog/2008/09/send-email-using-c-sharp/
:)السلام عليكم ورحمه الله وبركاته
ReplyDeleteألف شكر على الموضوع القيم والمفيد ده وجزاك الله كل خير