Is it possible to use the "from" in the config file as the MailMessage.From when creating an email in .net. Having trouble accessing it. Whenever I try referring ConfigurationManager I get a does not exist error but I am referencing them, see below.
<mailSettings>
<smtp from="test@test.org" deliveryMethod="Network">
<network host="smtpsend" defaultCredentials="true"/>
</smtp>
</mailSettings>
using System.Net.Mail;
using System.Net;
using System.Configuration;
using System.Net.Configuration;
MailMessage msg = new MailMessage();
msg.From = ***~~**
msg.Subject = string.Format(subject);
msg.IsBodyHtml = true;
msg.Body = body;
msg.Priority = MailPriority.Normal;
msg.To.Add("me");
SmtpClient client = new SmtpClient();
client.Send(msg);