I am not able to send txt file and html file as attachment when using higlaboo

Jan 21, 2015 at 3:26 PM
Edited Jan 21, 2015 at 3:27 PM
I get the following error when I send the mail having the above attachment

String reference not set to an instance of a String.
Parameter name: s

Below is the code

objSmtpMessage.From = new MailAddress(strFrom);
            string[] arrToAddress = strTo.Split(',');

            for (int i = 0; i <= arrToAddress.Length - 1; i++)
                objSmtpMessage.To.Add(new MailAddress(arrToAddress[i].ToString()));

            //objSmtpMessage.BodyText = strBody;
            objSmtpMessage.Subject = strSubject;
            //objSmtpMessage.IsHtml = true;

            if (strFileAttachment != "")

            objSendMailResult = objSmtpClient.SendMail(objSmtpMessage);

            if (objSendMailResult.SendSuccessful == false)
                var resultState = objSendMailResult.State; // need to write this in the log file path

            Common.SendEmailFailed = false;
        catch (Exception ex)
            Console.WriteLine("Error Has been Occured While Sending an Email.....");
            Common.SendEmailFailed = true;
            Common.GenerateErrorLogFile(ex, false);
Jul 19, 2015 at 2:33 AM
If you are sending email in C#,you can have a look at:

or try ask your question at StackOverFlow

Dude, You have posted your question at wrong place.
This place is for discussion of service of CodePlex.
Codeplex is an Open source project hosting site.
I believe you are asking something related to specific project which is hosted in CodePlex.
You won't find any answer here.
Try look for your project at [Search] at top right side of this page.