I was interested in creating a WebMethod that could send an email. I would prefer to use Visual Basic instead of C# since I know Visual Basic much better.
Printable View
I was interested in creating a WebMethod that could send an email. I would prefer to use Visual Basic instead of C# since I know Visual Basic much better.
Hello,
Yip, there should be no problem doing this.
The System.Net.Mail namespace has a bunch of classes for doing just that:
http://msdn.microsoft.com/en-us/libr....net.mail.aspx
Specifically SmtpClient, and it's associated methods:
http://msdn.microsoft.com/en-us/library/swas0fwc.aspx
The one difficultly that you might run into is the availability of an SMTP Server, which the SmtpClient assumes you have. Is this the case? If so, it is just a case of configuring the SmtpClient to point at this Smtp Server, and away your emails go.
Gary