473,387 Members | 1,561 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,387 software developers and data experts.

sending mail to multiple users

hi all,

I have a string str which contains email addresses seperated with ';' like vinodkumar.allapu@gmail.com;vinodkum...@ hotmail.com to whom i want to send mails with same body... when iam saying

mail.To.Add(str);

its displaying a message saying: The specified string is not in the form required for an e-mail address... can any one solve my problem by changing the code where iam going wrong....!!

thank you
May 19 '09 #1
4 2871
tlhintoq
3,525 Expert 2GB
you have to add individual addresses, not a gang of them. Just because outlook seperates with a semicolon doesn't mean .NET does.

Break down your big string by seperating at the semicolons and add each address one at a time.
May 19 '09 #2
daonho
18
Usually when I encounter problem like this, I split the list of email in array and add them individually.

dim arrEmails as string() = strEmailList.split(";")

Dim str as string = ""

foreach str in arrEmails
mail.to.add(str.trim())

next

Don't know why you add to the To field, but you can do mail.CC.add(...) or mail.BCC.add(.....)
May 20 '09 #3
You have separate the individual mail id from that string and then add it to
mail.to.add()
__________________
<removed advertising links>
May 20 '09 #4
hi all,

My problem is solved thanks for ur reply...The information provide by you is usefull to me.... Thanks a Lot
May 21 '09 #5

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

Similar topics

13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
1
by: vijoker | last post by:
I created a form in Access 2000 where upon choosing a person from a drown down and clicking a button would display everyone who reports to the person and send the person an email to verify...
6
by: Robert Pettersson | last post by:
Hi, I have built an webapp in C# that uses SMTPMail to send mail to users. When I installed it on the prodserver everything worked fine for me, but the users can not send mail. They get Access...
3
by: Riku Kosonen | last post by:
Hi, We have some problems with sending mail with the SMTP service on IIS (Windows 2000). We use the ASP.NET platform and have an ASPX-page that sends different mail messages to about 1000...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
5
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for...
2
by: softbreeze | last post by:
Operating systems: Windows 2003 Enterprise ASP.Net 2.0, IIS 6.0, *** SMTP is not installed *** I have a corporate network that has an SMTP server (10.254.3.30) on it. I have a subnet (10.5.42.0)...
0
by: ramab | last post by:
hi, i'm a bit stuck here in sending emails to multiple users which i need to read from a database. With codes below, i able only to send 2 recipients. any idea how to send to multiple users? thx...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.