G
Guest
System.Net.Mail.MailMessage has a constructor that takes two string
parameters (from and to). To is described as:
"A String that contains the addresses of the recipients of the e-mail
message."
But when I put a list of recipients as the to I get the error:
"The specified string is not in the form required for an e-mail address."
I'm using the form "(e-mail address removed);[email protected]" which the earlier
(System.Web) object handled properly.
I've looked all over the help and gotten nowhere, none of the examples use
multiple recipients. Plus I don't see that I could build a
MailAddressCollection to give to the MailMessage, because no constructor
takes one and the To property is read-only.
Come to think of it, why have a parameterless constructor and not allow the
From and To to be set?
So... How do I make a MailMessage with multiple recipients?
parameters (from and to). To is described as:
"A String that contains the addresses of the recipients of the e-mail
message."
But when I put a list of recipients as the to I get the error:
"The specified string is not in the form required for an e-mail address."
I'm using the form "(e-mail address removed);[email protected]" which the earlier
(System.Web) object handled properly.
I've looked all over the help and gotten nowhere, none of the examples use
multiple recipients. Plus I don't see that I could build a
MailAddressCollection to give to the MailMessage, because no constructor
takes one and the To property is read-only.
Come to think of it, why have a parameterless constructor and not allow the
From and To to be set?
So... How do I make a MailMessage with multiple recipients?