Hi,
I'm trying out a test mail script but it doesn't seem to work. The error I
get is that mail is not declared on the mail.To line.
Also, do I need to specify the SMTP Server? I have it commented out:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
Dim mail As New MailMessage()
mail.To = "xx**@xxxxx.com"
mail.From = "yo*@yourcompany.com"
mail.Subject = "this is a test email."
mail.BodyFormat = MailFormat.Html
mail.Body = "this is my test email body.<br><b>this part is in bold</b>"
'SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)
</script>
<html>
<head>
</head>
<body>
<form runat="server">
</form>
</body>
</html>
Thanks
--
Message posted via http://www.dotnetmonster.com