I am trying to get my C#.NET program to send an email with code which used to work. I do get warnings that the code is outdated. Here it is.
Can anyone find the problem or simply have working code to take its place? I just need to send an email. The machine running my program will be an XP machine.
MailMessage mailMsg = new MailMessage();
mailMsg.From = fromAddress;
mailMsg.To = toAddress;
mailMsg.Subject = subject;
mailMsg.Body = messageBody;
SmtpMail.SmtpServer = Configuration.SMTPServer;
mailMsg = null;