BOEING39
asked on
SYSTEM NETMAIL
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.Clien t.Credenti als.get'
AlternateView htmlView = AlternateView.CreateAltern ateViewFro mString(ht mlBody, null, "text/html");
message.AlternateViews.Add (plainView );
message.AlternateViews.Add (htmlView) ;
message.Priority = MailPriority.High;
smtpClient.Host = "server.net ";
SmtpClient.Credentials = new NetworkCredential("support @namannass ar.com", "passcode");
smtpClient.Send(message);
AlternateView htmlView = AlternateView.CreateAltern
message.AlternateViews.Add
message.AlternateViews.Add
message.Priority = MailPriority.High;
smtpClient.Host = "server.net ";
SmtpClient.Credentials = new NetworkCredential("support
smtpClient.Send(message);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thx for the quick response
It is situations like this where it is highly advisable to not name your variables the same name as the class you are instantiating (save for a change of casing). Subtle errors like these can crop up, and--depending on the scenario--could be much more harmful.