MVC C# Mail Gönderim İşlemleri ( SMTP)
<blockquote> <p>Sayfa </p> <p>SmtpClient client = new SmtpClient();<br /> MailAddress from = new MailAddress("[email protected]");//nereden<br /> MailAddress to = new MailAddress("[email protected]");//nereye</p> <p> MailMessage msg = new MailMessage(from, to);<br /> msg.To.Add(mail);<br /> msg.IsBodyHtml = true;<br /> msg.Subject = "Konu"<br /> msg.Body += selam; //burada başında gönderen kişinin mail adresi geliyor</p> <p> NetworkCredential info = new NetworkCredential("[email protected]", "mail şifresi");<br /> client.Port = 587;<br /> client.Host = "mail.dgn-yazilim.com";<br /> client.EnableSsl = false;<br /> client.Credentials = info;<br /> client.Send(msg);</p> </blockquote>