S
SAI KALYAN
Guest
While trying to send an email using I am getting an error in release mode smtp.Send fires a null reference exception on a test machine and works perfectly on Development machine.
MailMessage mail = new MailMessage();
mail.From = new MailAddress(FromEmail);
mail.To.Add(toEmailList);
mail.Subject = "Test";
SmtpClient smtp = new SmtpClient();
smtp.Host = HostName;
smtp.Port = PortName;
smtp.UseDefaultCredentials = true;
smtp.Send(mail);
saikalyan
Continue reading...
MailMessage mail = new MailMessage();
mail.From = new MailAddress(FromEmail);
mail.To.Add(toEmailList);
mail.Subject = "Test";
SmtpClient smtp = new SmtpClient();
smtp.Host = HostName;
smtp.Port = PortName;
smtp.UseDefaultCredentials = true;
smtp.Send(mail);
saikalyan
Continue reading...