using System; using System.IO; using Lavantech.Smtp; public class TestMail { public static void Main(string[] args) { try { EmailAddress from = new EmailAddress("myname@mydomain.com", "My Name"); EmailAddress[] to = new EmailAddress[1]; to[0] = new EmailAddress("siva@sivasys.com","Friend 2"); EmailAddress[] cc = new EmailAddress[1]; cc[0] = new EmailAddress("test@kalpakkam.com","My Name"); Message msg = new Message(from, to, null, null, "Test Mail", "Hello Friend..."); msg.AddAttachment(new FileInfo("C:\\test.zip")); SMTPMailer.SOCKET_TIMEOUT = 10000; SMTPMailer.SendMail(msg); } catch(MailException exp) { EmailAddress[] failedAddresses = exp.GetFailedAddresses(); string[] reasons = exp.GetReasons(); Console.WriteLine("Mail failed for the following email id: \n"); for(int i=0; i