Forum Moderators: open
<script language="vb" runat="server">
sub SendEmail(sender as Object, e as EventArgs)
dim mailclient as new SMTPClient("localhost")
Mailclient.send(Email.text, FROM EMAIL ADDRESS,SUBJECT,Comments.text)
end sub
</script>
I believe the code you are looking for is:
dim mailclient as new SMTPClient("localhost")
In the beginning of your ASP.NET file, you need to import the SMTP namespace using the following directive:
<%@ Import Namespace="System.Net.Mail" %>
I hope this helps,
Bruce