Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29919

Smtp emailing needs dispose method

$
0
0

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.


Viewing all articles
Browse latest Browse all 29919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>