Hi,
I am getting error "The type initializer for 'Aspose.Email.Mail.SmtpClient' threw an exception" in below code.
I have used ASpose.Email 2.2.0.0.But stil i am getting same error message.
SmtpClient client = new SmtpClient(network.Host, network.Port, network.UserName, network.Password);///getting error here
client.DeliveryMethod = Aspose.Email.Mail.SmtpDeliveryMethod.Network;
client.AuthenticationMethod = Aspose.Email.Mail.SmtpAuthentication.None;
client.SecurityMode = SmtpSslSecurityMode.Explicit;
client.EnableSsl = true;
client.Send(mailMsg);
Thanks,
Jacintha