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

E-mail multiple recipients?

I am using Visual Studio 2003, coding in C# and using .NET 1.1.

I have an application set up to send e-mails, but I need it to send to
multiple recpients in the BCC field. I know that if you just use the e-mail
addresses you can simply separate them with a semicolon. However I need to
include aliases, formatting as MyMsg.Bcc = "\"JOHN SMITH\"
<jo*******@xyzdomain.com>" etc. When I try doing that and separating with a
semicolon I get a compile error that reads "Only assignment, call, increment,
decrement, and new object expressions can be used as a statement."

What is the correct syntax to use when formatting this way?
Oct 12 '06 #1
2 2442
I am using Visual Studio 2003, coding in C# and using .NET 1.1.
>
I have an application set up to send e-mails, but I need it to send to
multiple recpients in the BCC field. I know that if you just use the e-mail
addresses you can simply separate them with a semicolon. However I need to
include aliases, formatting as MyMsg.Bcc = "\"JOHN SMITH\"
<jo*******@xyzdomain.com>" etc. When I try doing that and separating with a
semicolon I get a compile error that reads "Only assignment, call, increment,
decrement, and new object expressions can be used as a statement."

What is the correct syntax to use when formatting this way?
Put the semicolon *inside* the string:
MyMsg.Bcc = "\"JOHN SMITH\" <jo*******@xyzdomain.com>; \"JANE SMITH\"
<ja*******@xyzdomain.com>";

Hans Kesting
Oct 13 '06 #2
I figured it was something really simple. Thanks!

"Hans Kesting" wrote:
I am using Visual Studio 2003, coding in C# and using .NET 1.1.

I have an application set up to send e-mails, but I need it to send to
multiple recpients in the BCC field. I know that if you just use the e-mail
addresses you can simply separate them with a semicolon. However I need to
include aliases, formatting as MyMsg.Bcc = "\"JOHN SMITH\"
<jo*******@xyzdomain.com>" etc. When I try doing that and separating with a
semicolon I get a compile error that reads "Only assignment, call, increment,
decrement, and new object expressions can be used as a statement."

What is the correct syntax to use when formatting this way?

Put the semicolon *inside* the string:
MyMsg.Bcc = "\"JOHN SMITH\" <jo*******@xyzdomain.com>; \"JANE SMITH\"
<ja*******@xyzdomain.com>";

Hans Kesting
Oct 13 '06 #3

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

Similar topics

4
by: Maggie Blue | last post by:
Hi! Total "newbie to programming" here. I'm using Jack's Formmail.php, code at: http://www.dtheatre.com/scripts/source_view.php?path=formmail_code/formmail.phps and I'm trying to figure out...
15
by: news.microsoft.com | last post by:
HI, ASPEmail to send to multiple recipients? I tried to use comma and semicolon but all the time give this message error: Error: 6 - 501 Bad address syntax nor :...
7
by: Mega1 | last post by:
is this possable to send more than 1 report in one email
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
4
by: Michelle | last post by:
Hi Is it possible/anyone know how to send a document (.pdf) to multiple recipients using POP where the email is not just a matter of throwing 1000 email addresses in the BCC list, but each email...
0
by: nawaray | last post by:
hi.... i did this form for sending emails... the form consists of: text boxex: from, to , subject , attachment... buttons: send , forward, ...etc when i fill the info and send the email it...
2
by: npbaker1 | last post by:
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 =...
1
max2008mmm
by: max2008mmm | last post by:
I am trying to create a email contact form for our website. I want there to be four fields for a visitor to fill in (name, email address, subject, message). The subject field will be a drop-down...
16
bre1603
by: bre1603 | last post by:
I have a continuous form in Access 2007 that lists contacts for different agencies. Each record has a checkbox that I can use to generate a mass email to all selected contacts – it’s generic with no...
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
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.