Passing MailMessage as argument

angula

Active member
Joined
Jul 11, 2003
Messages
35
Is it possible to pass a mail message as an argument to a WebMethod?

Such as:

<WebMethod()> Public Function SendNote(ByVal Msg As MailMessage) As Boolean

....

End Function

Currently when I try to compile I get this error message:

The property From on type System.Web.Mail.MailMessage cannot be serialized because it is decorated with declarative security permission attributes. Consider using imperative asserts or demands in the property accessors.

Any thoughts?
 
Back
Top