I am getting a "Warning CA2213: 'mainForm1' contains field 'mainForm1.msg' that is of IDisposable type: 'MailMessage'. Change the Dispose method on 'mainForm1' to call Dispose or Close on this field. File: Form1.Designer.cs
I tried using msg.dispose(); after my smtp.Send(msg); but does not clear the warning. I am not sending attachments so i a not sure why i need this. Any Advice? Thanks.