SmtpClient.Send() complains of incorrect no of overloads when passing in MailMessage object
- by dotnetdev
Hi,
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2:
smtpClient.Send(mailMsg);
smtpClient is a reference to SmtpClient (I have the relevant references added), and likewise for mailMsg (is MailMessage) - there are no errors stating anything like check for missing assemblies.
However, I keep getting an error saying that I have the incorrect no of overloads, when SmtpClient takes either a MailMessage object or the To address, From address, Subject, etc.
Why doesn't this code work? Totally confused.
Thanks