[thelist] System.Web.Mail Error
Casey
aspnet at thecrookstons.com
Tue Jan 17 17:19:51 CST 2006
getting this error on this line: System.Web.Mail.SmtpMail.Send(objMM).
At least one of the From or Sender fields is required, and neither was
found.
<%@ Import Namespace="System.Web.Mail" %>
<script runat="server">
Sub FormSubmit(Sender As Object, E As EventArgs)
Dim objMM as New MailMessage()
Dim eBody as string
objMM.To = "abc at 123.com"
objMM.From = email.text
objMM.Subject = "!! Website Submission !!"
objMM.BodyFormat = MailFormat.html
eBody = "The following was submitted from the Contact page on your web
site:<br><br> "
eBody &= [removed]
objMM.Body = eBody
System.Web.Mail.SmtpMail.SmtpServer = "mail.123.com"
System.Web.Mail.SmtpMail.Send(objMM)
End Sub
</script>
Google has been no help. Thanks!!!
Casey
More information about the thelist
mailing list