473,805 Members | 1,981 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why MailMessage.Hea ders.Add("someK ey", "someValue" ) lower cases thekey?

Whenever I add a key to Headers it turns to a lower cased one while
Headers is of type NameValueCollec tion and NameValueCollec tion itslef
does not apply any lower or upper case change. Please consider
following code:

MailMessage mail = new MailMessage();
mail.Headers.Ad d("X-ECE_SEND", "1.01");
string str1 = mail.Headers.Ke ys[0];

//MailMessage.Hea ders is of NameValueCollec tion
NameValueCollec tion col = new NameValueCollec tion();
col.Add("X-ECE_SEND", "1.01");
string str2 = col.Keys[0];

after running above code you will find:
str1 = "x-ece_send"
str2 = "X-ECE_SEND"

I don't want anything to be changed.
Oct 7 '08 #1
0 1907

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2220
by: Matthew Wilson | last post by:
I'm using ConfigParser to store and retreive some data across multiple runs of my program and it looks like it automatically lower-cases my options: ---this is the program: import ConfigParser cp = ConfigParser.ConfigParser() cp.add_section('info') cp.set('info', 'Previous-IP', '0.0.0.0')
5
4574
by: Simran | last post by:
I need to set up an automated email system , which means users should not be able to respond back to the emails but at the same time, we need to track bounced emails. This is important as our customers are paying for this service, so we need to track the bounced email Id's. This is the code which I have tried:- MailMessage msgRequest = new MailMessage(); msgRequest.BodyFormat = MailFormat.Text; msgRequest.Subject = "Do Not reply to...
1
3650
by: stuart | last post by:
Hi, Can anybody tell me if it is possible to add your own headers through this class. The documenttion seems to be a bit ambiguous, for example the overview of the methods says Specifies the custom headers that are transmitted with the e-mail message. but the property is read only
4
1795
by: Chris | last post by:
Hi, How can I programatically set Upper, Lower and Normal case on a label or text box controls? Thanks
5
2136
by: Vlad | last post by:
We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage(); emailMessage.To = <address> emailMessage.Subject = "my subject"; emailMessage.Headers.Add("Content-Type","text/calendar;method=\"REQUEST\""); emailMessage.Body=@"BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST
1
2520
by: Curious | last post by:
I'm working on a word replacement program in .NET. I have a list of words spelt in American English and need to replace them with translated British spelling while keeping the upper or lower cases of each letter in these words. For instance, I have a dictionary below: theater theatre center centre annualized annualised
8
5195
by: travispennington | last post by:
To anyone that can assist me: I deeply appreciate your help!! I am developing an application with an outside vendor. The vendor has a very odd requirement. They need custom X-Headers added to an email received by their system. That's not the odd part. The oddity is they want to have a single X-Header containing multiple keys and values that are delimited by a carriage return, line feed and tab. The vendor claims other customers...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9185
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.