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

  • SEARCH
  • Home
  • 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 1034571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:24:48+00:00 2026-05-16T14:24:48+00:00

See RFC 2822 , section 2.1.1 and 2.2.3 to start Does System.Net.Mail.MailMessage auto fold

  • 0

See RFC 2822, section 2.1.1 and 2.2.3 to start

Does System.Net.Mail.MailMessage auto fold its header fields if their content exceeds the maximum length restrictions? RFC2822 states that a header field must not exceed 998 characters per line. To get around that, CRLF may be inserted to have a header field take up more than one line.

Thoughts?

  • 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-16T14:24:49+00:00Added an answer on May 16, 2026 at 2:24 pm

    The MailMessage class does not do any automatic folding at least until it’s sent using an SmtpClient. It’s only when the message is sent that .NET performs automatic folding of the header fields in order to construct the MIME message. You can check this by accessing MailMessage.Headers after the message is sent.

    The folding may occur at several places depending if the header field needs to be previously encoded. For example if the subject contains non US-ASCII characters it must be encoded in Base64 or Q encoding. In this case the classes responsible for the encoding also do the folding.

    If you use Reflector you can take a look for example at the MailWriter class which is one of the classes that performs folding and that, at least in .NET 2.0, uses the recommended default line limit of 78 characters per line as specified in RFC2822.

    Each line of characters MUST be no
    more than 998 characters, and SHOULD
    be no more than 78 characters
    ,
    excluding the CRLF.

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

Sidebar

Related Questions

I see various spellings of the non-RFC XFF HTTP header used for identifying the
See title: what does it mean for a C++ function to be inline?
See also How does a WCF server inform a WCF client about changes? (Better
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
SAPs Transactional RFC Technical Description document (release 4.0, see http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ee6bca90-0201-0010-5792-d9693e2eac83?QuickLink=index&overridelayout=true ) says in section
According to the RFC , individual cookies in the Cookie HTTP header may be
see code below.. <div style=overflow:auto;width:250px;height:75px;border:1px solid #336699;padding-left:5px> <label style={width:250px;}><input type=checkbox name=wow[] onclick='highlight_div(this);'> PHP</label><br> <label
See Title. .NET 2010 Express, building a C# Windows Form. Trying to enable Debug-and-edit,
See working example at http://jsfiddle.net/xqwqH . I have a green div inside a red
(see here for the problem I'm trying to solve) How do you get hibernate

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.