parallon
01-11-2008, 03:36 PM
Hello all. I am trying to send a dynamic ASP page thorugh and email using CDO, but I am having trouble figuring out how to call it. I have the following script:
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpout.myserver.net"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
oMail.From = "me@myemail.com"
oMail.To = "you@youremail.com"
oMail.Cc = ""
oMail.Bcc = ""
oMail.Subject = "Project and Task DELETED"
oMail.HTMLBody = "/email_Planned_Work_(form).asp?UserId="& Session(MM_Username)
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
I have also tried oMail.HTMLBody = "www.mywebsite.com/rpts/email_Planned_Work_(form).asp? and the only thing I am getting is the following in the email:
/email_Planned_Work_(form).asp
I have read about using CreateMHTMLBody, but then I get the error that the command isn't supported.
Any help would be greatly appreciated.
Parallon
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpout.myserver.net"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
oMail.From = "me@myemail.com"
oMail.To = "you@youremail.com"
oMail.Cc = ""
oMail.Bcc = ""
oMail.Subject = "Project and Task DELETED"
oMail.HTMLBody = "/email_Planned_Work_(form).asp?UserId="& Session(MM_Username)
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
I have also tried oMail.HTMLBody = "www.mywebsite.com/rpts/email_Planned_Work_(form).asp? and the only thing I am getting is the following in the email:
/email_Planned_Work_(form).asp
I have read about using CreateMHTMLBody, but then I get the error that the command isn't supported.
Any help would be greatly appreciated.
Parallon