Answered
Defining oMail in CDOsys
I'm using CDOsys through my hosting provider (GoDaddy) to
send an email when my Access database has been changed. The CDOsys
code, as provided by GoDaddy, is within the insert command in DW;
here's the code right before the CDOsys info and right after:
MM_editCmd.ActiveConnection.Close();
//body of email
mailbody = "the message goes here."
//Send the e-mail
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "test@test.com";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
SmtpMail.Send(oMail);
oMail = null; // free up resources
if (MM_editRedirectUrl) {
I get this error:
Microsoft JScript compilation error '800a03ec'
Expected ';'
MailMessage oMail = new System.Web.Mail.MailMessage();
How do I define oMail properly, using ASP javascript, to send the email?
MM_editCmd.ActiveConnection.Close();
//body of email
mailbody = "the message goes here."
//Send the e-mail
MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "emailaddress@domainname";
oMail.To = "test@test.com";
oMail.Subject = "Test email subject";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = "Sent at: " + DateTime.Now;
SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
SmtpMail.Send(oMail);
oMail = null; // free up resources
if (MM_editRedirectUrl) {
I get this error:
Microsoft JScript compilation error '800a03ec'
Expected ';'
MailMessage oMail = new System.Web.Mail.MailMessage();
How do I define oMail properly, using ASP javascript, to send the email?
