Email sending with Attachment public static bool SendEmailMessage( string SenderEmailAddress, string SenderPassword, string SenderHostName, int SenderPort, string Subject, string Body, string emailTO, bool EnableSSL = false, string CC = "", string BCC = "", MailPriority Priority = MailPriority .Normal, string path = "") { try { System.Net.Mail.MailMessage objMail = new System.Net.Mail.MailMessage(); //Set from address objMail.From = new MailAddress(SenderEmailAddress); // Set to addresses if (string.IsNullOrEmpty(emailTO)) { objMail.To.Add(new MailAddress(emailTO)); } // Set CC addresses if (string.IsNullOrEmpty(CC)) { objMail.CC.Add(new MailAddress(CC)); } // Set BCC addresses