Posted on 2012-12-24
The following code was being utilized with a form for which after submittal it would send out an e-mail. I recently changed host services and now it appears that I need to incorperate the host server credentials ie "Name and Password" to function. Referencing the code below I am gettting a line error @ (SmtpClient.Credentials) stating an object reference is required or property 'System.NetMail.Smtp.Client.Credentials.get'
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(htmlBody, null, "text/html");
message.Priority = MailPriority.High;
smtpClient.Host = "server.net ";
SmtpClient.Credentials = new NetworkCredential("email@example.com", "passcode");