Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4038494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:28:47+00:00 2026-05-20T12:28:47+00:00

We are facing a strange issue while sending email. It seems that the new

  • 0

We are facing a strange issue while sending email. It seems that the new line is not always working. Our code is

string mailSubject = "EBN Import Success. Client: " + ClientName.Trim();

StringBuilder mailBody = new StringBuilder("Client Name: " + ClientName.Trim());
mailBody.Append(System.Environment.NewLine + "File Name: " + FileName);
mailBody.Append(System.Environment.NewLine + "FileID: " + FileId);
mailBody.Append(System.Environment.NewLine + "BatchID: " + BatchID);
mailBody.Append(System.Environment.NewLine + System.Environment.NewLine + "Records in File (or staging): " + noOfRecords.ToString());
mailBody.Append(System.Environment.NewLine + "Records imported into BNCStaging: " + noOfRecords.ToString());
mailBody.Append(System.Environment.NewLine + "Records imported into EBNTrackings: " + noOfRecords.ToString());

string mailTo = ConfigurationManager.AppSettings["ErrorEmailTo"].ToString();
string mailFrom = ConfigurationManager.AppSettings["EmailFrom"].ToString();
string mailHost = ConfigurationManager.AppSettings["EmailServer"].ToString();

SmtpClient mailClient = new SmtpClient(mailHost);
mailClient.Send(mailFrom, mailTo, mailSubject, mailBody);

The output we are getting is

Client Name: [Client Name]File Name: [File Name]
FileID: nnnn
BatchID: mmmm

Records in File (or staging): x
Records imported into BNCStaging: y
Records imported into EBNTrackings: z

that is the client name and file name are coming in the same line.

We have also tried with AppendLine() and with ‘\n’ without luck.

Any suggestions…

By the way we are using .net 4.0 and the mail client is outlook

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:28:48+00:00Added an answer on May 20, 2026 at 12:28 pm

    In Outlook, click Extra line breaks in this message were removed, then click Restore line breaks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing strange issue with our WCF service. The same code was working
I'm facing a strange issue with some TSQL code on SQL2005. The piece we
I am facing strange issue. I have wep-part that reads data from user's profile.
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing
I'm facing a problem while unit testing my forms. The problem is that data
I'm facing sort of a strange issue with two applications of mine. Here's the
I'm facing a strange issue, I'm trying to localize a website, so i converted
I'm facing very strange issue, I'm getting JSON object from django powered site and
I am facing a strange issue after the popup is created onclick . The
I am facing very strange issue. When I was running my app in iPhone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.