Unable to send email using smptp client in c#

Unable to send email using smptp client in c#

Hi,

I am unable to send emails using smtp client in c#

I have the following configurations

                   MailAddress from = new MailAddress(" xxx@xxxx.com","xxxx");
                    smtp.Host = "smtp.zoho.com";
                    smtp.Port = 465;
                    smtp.EnableSsl = true;
                    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                    smtp.UseDefaultCredentials = true;
                      smtp.Credentials = new System.Net.NetworkCredential(" xxx@xxx.com", "xxxx","mydomain.com");

Any help will be much appreciated.