Buyrun
string fromAdres =
[email protected];
string fromName = "Gönderenin Adı";
string toMail = "
[email protected]";
string toName = "ToName";
string toSubject = "Mesajın Konusu";
string sifre = "smtpdekullanilacaksifre";
string msgBody = "Buraya mesaj yaz" +
"\n" +
"\n" +
"İstersende textbox textini yazdır: " + TextBox1.Text;
SmtpClient client = new SmtpClient();
client.Credentials = new System.Net.NetworkCredential(fromAdres, sifre);
client.Host = "buraya mail göndereceğin sunucuyu yaz";
client.EnableSsl = false;
MailAddress from = new MailAddress(fromAdres, fromName);
MailAddress to = new MailAddress(toMail, toName);
MailMessage message = new MailMessage(from, to);
message.Subject = toSubject;
message.Body = msgBody;
client.Send(message);
Bu şekilde textbox1 e girilen metni istediğin bir yere mail olarak gönderebilirsin. Umarım işini görür.