I get a message that the server requires authentication when I get the bottom line of the following code.
MailMessage message = new MailMessage(); message.From = new MailAddress(" me@myemail.co.uk "); message.To.Add(new MailAddress(" me@myToAddress.co.uk ")); message.Subject = "Message subject"; message.Body = "This is the content"; SmtpClient client = new SmtpClient(); client.Send(message);
However, I thought I already gave him the information he requires in webconfig, as follows:
<mailSettings> <smtp from=" me@myemail.co.uk "> <network host="mySMTPserver" port="25" userName="myEmail" password="myPass" /> </smtp> </mailSettings>
Any advice that I really liked, I read a lot of posts here, and they all all seem to provide login in the same way.
source share