string body = "my message" + txtFriendName.Text + Environment.NewLine + Environment.NewLine + " my url link - " + "http://www.mywebsite.com"; MailMessage email = new MailMessage("sender email", txtFriendEmail.Text, txtName.Text + "subject", body); SmtpClient SmtpMail = new SmtpClient("smtp.fasthosts.co.uk", 25); SmtpMail.Credentials = new NetworkCredential("sender email", "password"); SmtpMail.EnableSsl = false; SmtpMail.Send(email);
try/catch
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)