Reputation: 17281
I'd like to setup a WCF service to send emails. The System.Net.MailMessage doesn't seem to be serializable, and cannot be passed in a [DataContract]
The error I receive is
Type 'System.Net.Mail.MailAddress' cannot be serialized. Consider marking it with the DataContractAttribute
Any suggestions?
Upvotes: 3
Views: 3495
Reputation: 21873
Whatever you pass to a WCF service needs to be either XML or binary serializable.
A "classic" messaging approach would be:
Upvotes: 3