Bilgiler > Asp.net Mail Gönderme
Asp.net Mail Gönderme
public static bool epostagonder(string knu, string txt,string to,string from)
{
MailMessage mail = new MailMessage(from,to, knu, txt);
SmtpClient smtpcli = new SmtpClient("smtp.gmail.com");
smtpcli.Port = 587;
smtpcli.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpcli.Credentials = new NetworkCredential("xxx@gmail.com", "şifre");
smtpcli.EnableSsl = true;
mail.Sender = new MailAddress(from,"gonullukutuphane.com");
smtpcli.Send(mail);
return true;
}
***