473,238 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

C# Web Help with sending E-mail to multiple recipients

I am not able to get an e-mail sent to multiple recipients. I am using C# in VS 2003.

Here is the code:

MailMessage mail = new MailMessage();
mail.To = "address1@somewhere.com;address2@somewhere.com ";
mail.From = "My Program";
mail.Subject = "Alert";
mail.Priority = MailPriority.High;
mail.BodyFormat = MailFormat.Text;
mail.Body = sMessage;
SmtpMail.SmtpServer = "mymailserver.somewhere.com";

When using this the message gets sent to address1 and address3 but not address2. I have also tried using a comma in place of the semicolon with no luck. I am at a loss as I get no error message and everything I have looked up says that this is correct and should work. Any help would be apprectiated.

Mar 28 '08 #1
2 2401
7,872 Expert 4TB
Well the MSDN on that isn't very good since they obsoleted it.
Their examples don't seem to lend it as a possibility that you can do multiple recipients though.
However using trickery I found this:
[quote=MSDN for System.Web.Mail.MailMessage.To]
Property Value
A semicolon-delimited list of e-mail addresses.

Are your addresses all valid?
Mar 28 '08 #2
4,871 Expert 4TB
This does work, I'd guess that Plater is right the problem is with the email address3. Try replacing it with your own - in fact you may want to ensure none of them are live or you may get accused of spamming :).
Mar 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: NotGiven | last post by:
The code below is designed to loop through rows of a database query obtaining email addresses and send an email to each. It is modified form fomr some code I found on the net. With each while...
by: fishboy | last post by:
Howdy, I'm in middle of a personal project. Eventually it will download multipart binary attachments and look for missing parts on other servers. And so far I've got it to walk a newsgroup and...
by: Gidi | last post by:
Hi, i have a textBox that when it get focused i'm sending ALT+SHIFT (to change the current language) i compare the current language to the one i need (using InputLanguage.CurrentInputLanguage),...
by: Dee | last post by:
Hi I have added EnableViewStateMac="false" to the sending WebForm's @Page Directive and my sample code has the following line: Dim coll As...
by: Amol | last post by:
Hi , I am developing a web application.I need an interface in my application which will allow the user to send the fax domestic /international.I dont want to use 3rd party tool /service .Does...
by: rich | last post by:
Hi all, I have a fairly complex "feed" application that recieves messages from an external user-supplied API via a callback function, and attempts to forward these messages to another...
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
by: srivineel | last post by:
Hello EveryBody I need to send sms from dotnet application to my mobile. For this task i have gone through the material on the net. Iam getting good info abt this. And in ...
by: Vajrala Narendra | last post by:
in the i got few problems please solve to help me also send information regarding email sending. Try Dim mailbody As String mailbody = "" mailbody =...
by: senthurganesh | last post by:
Hai Am Developing SMS Sending Application using C#.Net. MY Problem Is Sending SMS via COM3.But It Throw Different Exception . Till Now Am Didn't Face That Problem. Am Connect The Mobile...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.