E-mail multiple recipients?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Josh

    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\"
    <johnsmith@xyzd omain.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?
  • Hans Kesting

    #2
    Re: 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\"
    <johnsmith@xyzd omain.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\" <johnsmith@xyzd omain.com>; \"JANE SMITH\"
    <janesmith@xyzd omain.com>";

    Hans Kesting


    Comment

    • Josh

      #3
      Re: E-mail multiple recipients?

      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\"
      <johnsmith@xyzd omain.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\" <johnsmith@xyzd omain.com>; \"JANE SMITH\"
      <janesmith@xyzd omain.com>";
      >
      Hans Kesting
      >
      >
      >

      Comment

      Working...