C Sharp ile Mail Gönderimi

MailMessage posta = new MailMessage();

posta.From = new MailAddress(“From Mail Address”, “From Alias”);

posta.IsBodyHtml = false;

posta.Priority = MailPriority.High;

posta.Subject = “Mail subject”;

posta.Body = “Mail Body”

posta.To.Add(“Mail To”);

SmtpClient smtp = new SmtpClient();

smtp.Credentials = new System.Net.NetworkCredential(“Sender Mail Address”, “Sender Mail Password”);

smtp.Host = “Sender smtp server”;

smtp.EnableSsl = true;

smtp.Port = 587;



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: