M
Mark Mahacek
I have copied over code to create an e-mail from a web form, but I am
getting the following error: (pathnames changed)
The following exception occurred: System.Web.HttpException: Could not create
'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoundType() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.SmtpMail.Send(MailMessage message) at
www.mydomain.org.LabReserve.ComposeMail() in
C:\......\LabReserve.aspx.vb:line 87
The code is:
Dim smtpServer As String = "mail.mydomain.org"
Dim mail As MailMessage = New MailMessage
Dim body As String
mail.From = (e-mail address removed)
mail.Cc = (e-mail address removed)
mail.Subject = "Lab Reservation Request"
body = body + "Requestor: " + txtName.Text + vbLf
body = body + "EMail: " + txtEMail.Text + vbLf
body = body + "Title: " + txtTitle.Text + vbLf
body = body + "Start Date: " + calStartDate.SelectedDate.ToShortDateString +
vbLf
body = body + "" + vbLf
mail.Body = body
SmtpMail.SmtpServer = smtpServer
SmtpMail.Send(mail)
I've used this same structure in other areas and it works just fine.
getting the following error: (pathnames changed)
The following exception occurred: System.Web.HttpException: Could not create
'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoundType() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.SmtpMail.Send(MailMessage message) at
www.mydomain.org.LabReserve.ComposeMail() in
C:\......\LabReserve.aspx.vb:line 87
The code is:
Dim smtpServer As String = "mail.mydomain.org"
Dim mail As MailMessage = New MailMessage
Dim body As String
mail.From = (e-mail address removed)
mail.Cc = (e-mail address removed)
mail.Subject = "Lab Reservation Request"
body = body + "Requestor: " + txtName.Text + vbLf
body = body + "EMail: " + txtEMail.Text + vbLf
body = body + "Title: " + txtTitle.Text + vbLf
body = body + "Start Date: " + calStartDate.SelectedDate.ToShortDateString +
vbLf
body = body + "" + vbLf
mail.Body = body
SmtpMail.SmtpServer = smtpServer
SmtpMail.Send(mail)
I've used this same structure in other areas and it works just fine.