How to send an email from my C# codebehind - Getting System.Net.Mail.SmtpFailedRecipientException
I have a webform where someone can set up an account - I want to send them an email confirmation. The code I'm using: // Create e-mail message MailMessage mm = new MailMessage(); mm.From = new MailAddress("OurOrganisationEmail@ourdomain.com", "Our Organisation"); mm.To.Add(new MailAddress("webuser@domain.com", "Web User")); mm.Subject = "Confirmation"; mm.Body = "You are now registered test"; mm.IsBodyHtml = true; // Send e-mail sc = new SmtpClient(); NetworkCredential basicAuthenticationInfo = new NetworkCredential(“OurOrganisationEmail@ourdomain.com”, “ourorganisationemailPassword”); sc