Mail sent using MailMessage class displays "TO" and "CC" recepients in the message body when sent to large number of recepients

I'm using System.Web.Mail to send an email message from an ASP.NET web
page.
This is the main section of the C# code.

//************* start code *****************************
string[] mailHost =
(System.Configuration.ConfigurationSettings.AppSettings.GetValues("mailserver"));

//Get data from page
string toAddress =
((tbTo.Text==null)||(tbTo.Text.Equals(String.Empty)))?String.Empty:tbTo.Text.Trim();
string ccAddress =
((tbCC.Text==null)||(tbCC.Text.Equals(String.Empty)))?String.Empty:tbCC.Text.Trim();
string subjectLine =
((tbSubject.Text==null)||(tbSubject.Text.Equals(String.Empty)))?String.Empty:tbSubject.Text.Trim();
string messageText =
((tbMessage.Text==null)||(tbMessage.Text.Equals(String.Empty)))?String.Empty:tbMessage.Text.Trim();
//Set message parameters
MailMessage MyMail = new MailMessage();
MyMail.From =
(System.Configuration.ConfigurationSettings.AppSettings.GetValues("fromaddress"))[0];
MyMail.To = toAddress;
MyMail.Cc = ccAddress;
MyMail.Subject = subjectLine;
MyMail.BodyFormat = MailFormat.Text;
MyMail.Body = messageText;
SmtpMail.SmtpServer = mailHost[0];
//send email
SmtpMail.Send(MyMail);
//************* end code *****************************

This code works perfectly when I send email to 5-10 users. However,
when I select a larger group of people the email gets jumbled up. It
puts all the "TO" addresses in the body of the message and also some
extraneous email header info (scroll down for more info). This software
I'm writing will be used to email hundreds of users on a daily basis.

Email message body looks like this for 5-10 users:
-------------------------------------------------
This is a test email. Please ignore and delete.
-------------------------------------------------

Email message body looks like this for a larger number of people
(a...@test.com  is simply a dummy address I'm using for this posting):
-----------------------------------------------------
To:<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>,<a...@test.com>
CC:<a...@test.com>
Subject: Test: Please ignore
Date: Fri, 16 Sep 2005 12:18:21 -0400
Message-ID: <00c101c5bada$4173eb80$0dfea8c0@odcisweb1>
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
Return-Path: webmas...@mycompany.com
X-OriginalArrivalTime: 16 Sep 2005 16:27:57.0147 (UTC)
FILETIME=[98A4D2B0:01C5BADB]

This is a test email. Please ignore and delete.
-----------------------------------------------

I cannot email such a large group of users again and again to find more
specifics. Please help. Why is my email not displaying the message
only? Why is it displaying all the recepients in the message body? Is
there a fix to this problem or do I have

0
9/16/2005 5:27:33 PM
exchange.admin 57650 articles. 2 followers. Follow

0 Replies
548 Views

Similar Articles

[PageSpeed] 0

Reply:

Similar Artilces:

To create a message with default Cc:, Bcc:
When ever i sena a message from my outlook express irrespective of address. i want a copy to be sent to a particular ID. can u please help me out This newsgroup is for support of Outlook 97, 98, 2000, 2002 & 2003 from the Office family for Intel PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x http://support.microsoft.com/newsgroups/default.aspx?ICP=GSS3&NewsGroup=microsoft.public.windows.inetexplorer.ie5.outlookexpress&SLCI...

Sent file to my e-mail acct, and it keeps sending )2000 Outlook)
Work at firm where I'm to get a new computer. I had several large files on my old hard drive which I wanted to save. Thinking that it would be easier to e-mail files to myself than to upload on disks, I attached files (from my Outlook e-mail and e-mailed files to my Outlook e-mail. It did send the files to my e-mail account, but it won't stop sending. I cannot receive any new e-mail. It's been going on for several days now. Is there any way to stop this e-mail from continuing to send? (I goofed I know. The file was likely too large to send and possibly the reason f...

web access to exchange server for dial-up using from outside
hi. i have exchnage mail installed in my network. the users work only locally. but there are some users who dial-up to their mailboxes in my exchange from outside. Now i want to create such connexion too. what should i do? show i buy external ip adress to rouse my local to it? thank you If your remote users dial into ISP then yes, you need external (preferably fixed) IP address. If they dial into your office then you do not need external address for them to access their mail. Kerberos wrote: > hi. > > i have exchnage mail installed in my network. the users work only loc...

How can I use VBA ADO to check if a table exists in an Access DB?
Hi! If I aready have an access DB called c:\temp\MyDb.mdb, is there any way that I can use ADO to check if a table exists in this database? Thanks, Aijun. -- Ai_Jun_Zhang ------------------------------------------------------------------------ Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25474 View this thread: http://www.excelforum.com/showthread.php?threadid=397998 Here is a simple function. Call with ?IfTableExists("C:\temp\MtDB.mdb","DB") Function IfTableExists(FileName As String, Table As String) As Boolean Dim o...

Setting up Outlook Express to work with an MSN e-mail account
Does anybody know how to set up Outlook Express to work with an MSN e-mail account? There are instructions for Hotmail but they don't work. Any help is appreciated... "J.O." <anonymous@discussions.microsoft.com> wrote in message news:041b01c3db01$0002a750$a501280a@phx.gbl... > Does anybody know how to set up Outlook Express to work > with an MSN e-mail account? There are instructions for > Hotmail but they don't work. Any help is appreciated... This newsgroup is for support of Outlook 97/98/2000/2002/2003 from the Office suite of products. Outlook Expr...

"None of your e-mail accounts could send to this recipient".
Kb seems to recognise there's a problem, using MSO2003 SP1, but offers no fix. Any ideas? I have even tried sending in plain text, single addresses etc, but nothing. Try configuring your account to authenticate to the SMTP server that you are sending thru. (Known issue and MS is working on a fix. No ETA on when it will be available.) "Logicalman" <Logicalman@discussions.microsoft.com> wrote in message news:659889BE-4634-49A2-8663-1C0795E9E4B5@microsoft.com... > Kb seems to recognise there's a problem, using MSO2003 SP1, but offers no > fix. Any ideas? I ha...

Forwarding e-mail to external account
My boss wan't his mailbox to also be forwarded to his friend . how can i do that from exchangeserver. Many thanx robel wrote: > My boss wan't his mailbox to also be forwarded to his > friend . how can i do that from exchangeserver. > > Many thanx Hi, you have to create a "contact" in AD users... This contact must be "mail-enabled" to give it the "distant e-mail" and have it to appear in the global list. Selecting the boss mailbox, you will be able to select the contact in "delivery" configuration. A check box will also let you s...

Unable to access folders after changing mail server
Hi, I am using MS outlook 2003(win xp) with lotus notes connector to access my office mails. Everything was working properly untill I changed my mail server to a new one. The nsf file was also copied to the new domino server. But after this my outlook stopped working. It shows below message while trying to access inbox. "Cannot start Microsoft Office Outlook, Unable to open the Outlook window. The set of folders could not be opened. The server is not available. Contact your administrator if this condition persists." I deleted and recreated my outlook profile,but the problem still...

Need help!
Hi all: I am trying to extract some data from an Access query using MS Query while in Excel. The access query will extract the data from the data source without any problems. (I can even cut and past the data from the access query to the excel spreadsheet.) The problem arises when I go to refresh the data in the excel spreadsheet using the MS query. I get the following error message: "[Microsoft][ODBC Microsoft Access Driver] Invalid character value for cast specification on column number 4 (SumofSumofTransValue)" Can anyone shed some light on this problem? Everything wo...

How to forward Exchange mail account to WEB mail account
Hi Folks, I need to forward Exchange mail account to WEB mail account; for example to a hotmail or network solutions account. Please advise as to how to do this. Thanks, Dougf On Thu, 15 Feb 2007 11:52:42 -0800, Dougf <Dougf@discussions.microsoft.com> wrote: >Hi Folks, > >I need to forward Exchange mail account to WEB mail account; for example to >a hotmail or network solutions account. > >Please advise as to how to do this. >Thanks, Dougf If you want to have mail delivered to both places: Create a mail enabled AD contact. Go to the delivery options button on ...

Do i have to use an HOTMAIL account for Windows Live Mail?
I'm so frustrated! I just got a new website for my business and I am trying to set up my e-mails through windows live but it keeps sending me errors. I am inputting all my information as the guy told me to but it still isnt working. Apparently my e-mail will work in OUTLOOK though. Can anyone tell me if i have to use an hotmail account or if i can use my own such as nicole@gmpearson.ca Please post the error message in its entirety. You can left click on it to highlight and then right click to copy and then paste it into this thread. -- Bruce Hagen MS-M...

How can I restore an accidentally deleted unread mail folder ?
Definitely a novice...I accidentally deleted my unread mail folder from my mailbox instead of just deleting 1 unread email. Ive been trying to figure it out myself...but anything I read about how-to doesn't seem to cover my exact blunder. I will be forever grateful for some help !!!! You can recreate the search folder if you deleted it by creating a new search folder. Did you actually delete the folder or remove it from your Favorite Folders? "Sunny" <Sunny@discussions.microsoft.com> wrote in message news:79F9D07E-53F4-4EBC-9A64-451FA135BDE4@microsoft.com... > ...

Want subset of large db table and not load the entire table into access
Hello, How do I load a subset of a table from an ODBC database without linking or importing the entire table? I tried a select into statement, but it didn't work. Also, excell allows to do a query to load info into a worksheet table that is effective. Is there any way to query a database and insert that query into a table in access with out linking or importing the entire table? Thanks, Ken Hi, Ken. > Is there any way > to query a database and insert that query into a table in access with > out linking or importing the entire table? Create a view in the other database with o...

using exchange to check other pop3 accounts
I have a local exchange server on a small network. our email is hosted by our isp on a dedicated server I have using mail enable. I connect to it via pop 3. I have the exchange box on the network to have a mail store so I don't loose email. That's it's only real funciton. When I get email through outlook 07 it's from the other server and then it saves in exchange etc. is there any way in exchange 2003 or the upcomming 2007 server to have IT check the other server box so I don't have to do it through outlook? This would allow me to not have to have outlook running for...

When to use CCriticalSection?
I have an app in which there are 4 threads running simultaneously. Right now am using "Events" to do the synchronization between threads. Like, there is a Server writing thread and then there is a Server reading thread. Once Read thread, reads data from Server, it will Set an Event for Write thread to continue. So my question is, In this scenario do i need to use CCriticalSection? >I have an app in which there are 4 threads running simultaneously. >Right now am using "Events" to do the synchronization between >threads. > >Like, there is a Server writing ...

Can i add a person's name always in the To or CC Box?
When ever i send a mail, Can i add a person's name always in the To or CC Box?. If it is possible, Please let me know the procedure. I am using outlook 2007 professional. "Chandru." <Chandru.@discussions.microsoft.com> wrote in message news:D46E0E40-7205-4472-8B67-006EB34B953D@microsoft.com... > When ever i send a mail, Can i add a person's name always in the To or CC > Box?. If it is possible, Please let me know the procedure. I am using > outlook > 2007 professional. With extra code, yes. Here's an example: http://www.outlookcode.c...

Exchange Server 5.5 Admin access and contol over MS Outlook client's mail
An inquiry on Exchange Server 5.5 and MS Outlook client Hi All, Could my System and Exchange Admin with full control and access make some changes and amendments to an old Received and/or Sent emails at a user mail box folders?, save the changes or amendments at the Exchange Server 5.5 and at its original location in the users mailbox keeping the old original old dates of those emails as before the amendment is being done? is that possible at all? and could it be accomplished or not? is it possible to change an email source code to change the email text? is that possible and how ? ...

should be allowed to switch of posting message for unanalyzed acc
A message is displayed "The Analytical Transaction Entry window has not been opened even once. Do you want to open the window before saving/posting?" when entering a cash receipt in Bank Management. We are not currently analysing the account codes being posted to and would like to be able to switch these messages off rather than clicking "yes" on the warning and opening the window and closing it or removing the account from the accounting class. Ideally we would like a method of adding the codes to a class, and then saying no analysis required. ---------------- Thi...

Administrator Email Account HUGE
On my exchange 2003 server (sp1), enterpeise ed. our Administrator email box is BY FAR the largest in the company. It has over 2 Million Email messages in it. I want to delete all the messages in this mailbox, and clean it out. What is the easiest way to do it (and safest). There is nothing in there that I want to keep. Please Inform. Thank you. -- Network Administrator Simon Paston & Sons Agency Delete mailbox, run mailbox cleanup, purge mailbox, then recreate. Else log in to mailbox and delete messages (would probably take a lot longer). -- Bharat Suneja MCSE, MCT www.zenpr...

How to access member class of activex control
I'm creating an activex custom media player and have added methods which are accessible from Javascript using DISP_FUNCTION. This works, for instance by calling Player.Play() Player.Stop(), etc from javascript in IE. However what I like to do, is be able to call the appropriate member class of my activex control directly to handle commands, keeping methods where they belong, inside the class. The correct Javascript syntax would be Player.Controller.Play(), or Player.View.GoFullscreen() etc. I've seen this syntax in Javascript with other activex controls so I know it can be done, for ...

How to get records from Local Access Databse Using OPENROWSET Function
Dear Sir, I am using OPENROWSET Function to open Access Database File and my Query is as follows. SELECT Field1 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'D:\Sanjay\My Projects\Settings.mdb'; 'admin'; '', AppVersion) If I run this application on client computer and the specified file is exist on client computer then it display error as follows because it tries to search file on server [Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message &q...

None of your e-mail accounts could send to this recipient.
An application we run creates an email then invokes the machine's defualt MAPI client (Outlook) and puts the message in the Outbox. When we try to send we get the follow error returned immediately from "Sytem Administrator": "None of your e-mail accounts could send to this recipient." Have tried security levels, deleting all email accounts but the default plus searching various support pages. ...

A button to download messages only from one account
Hi, I have eleven e-mail accounts in OE 2003. One of them is the most important of all and frequently I have to download messages only from that one. How can I create a button to download messages from that account? (If I need to create a macro, I must say I have no experience with VBA). Thanks ...

when i send e-mail from distribution list to not existent account not recive non-delivery e-mail
I have the following problem: When sending an e-mail using a Distribution list as sender (of a secondary domain configured on exchange 2003) and the reciever's address is nonexistent, I do not obtain the message of failed delivery. It is possible to rivere non - delivery email on a distribution list? On 19 Jan 2007 02:30:25 -0800, "carlo" <carlo.marinelli@gmail.com> wrote: >I have the following problem: > >When sending an e-mail using a Distribution list as sender (of a >secondary domain configured on exchange 2003) and the reciever's >address is none...

Limit Accounts displayed to just customers while in Service Activi
What's the easiest way to limit the Accounts that are displayed in the Form Assistant to actual customers when I create a new Service Activity? I've set the "Relationship Type" within the Account record. I'm assuming I could do an OnLoad trick to filter the Account based on "Relationship Type = Customer" right? Any pointers?? ...