This project is read-only.

I can't send email with attachment of type .txt and .html file

Feb 4, 2015 at 2:56 PM
I am trying to send attachment files of type .txt and .html as extensions but the mail is not getting sent it gives error. for this i am giving you my code of sending the mail with attachment of type .txt
        SmtpClient objSmtpClient = new SmtpClient();
        SmtpContent objSmtpContent = new SmtpContent();
        SmtpMessage objSmtpMessage = new SmtpMessage();
        objSmtpClient.ServerName = "xxx";
        objSmtpClient.Port = 25;
        objSmtpClient.UserName = "";
        objSmtpClient.Password = "";
        objSmtpMessage.From = new MailAddress("xxx@xyz.com");
        objSmtpContent.LoadFileData(@"D:\\helllo.txt");
        objSmtpMessage.Contents.Add(objSmtpContent);
        objSmtpMessage.To.Add(new MailAddress("ccc@xyz.com"));
        objSmtpMessage.Subject = "hello this is try";
        objSmtpMessage.SetBodyAsHtmlContent("<br>hello<br>");
        objSmtpClient.SendMail(objSmtpMessage);
Feb 5, 2015 at 7:15 AM
Hello Higty : Please answer Rahul Shindi Query.
Feb 13, 2015 at 9:38 AM
Hi.

Sorry late reply.
I'm moving to HigLabo library to Github and I don't have a time to investigate this error.

Please wait for one or some week.