I have a small WinForms application that sends notification emails. It works fine with outlook clients but bombs if a gmail/yahoo/windowslive address is entered. I've seen many posts using system.web.mail and schemas but Visual Studio 2010 gives me an error when trying to use this (I'm assuming because of .Net 2.0). Is it possible to configure my smtp client code to relay to all of these email providers?

Im using system.net.mail with MailMessage. My configuration code is below...

SmtpClient mailSender = new SmtpClient("smtp.myclient.com");
            mailSender.EnableSsl = true;
            mailSender.Send(message);

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top