E-mail multiple recipients?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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\"
<[email protected]>" 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?
 
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\"
<[email protected]>" 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\" <[email protected]>; \"JANE SMITH\"
<[email protected]>";

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top