CDOSYS - Newbie

M

monki

I am having a problem getting a CDOSYS mail form working. the form processes
ok on the server however the email is never received.

The page was running fine with CDONTS until the server was upgraded,
unfortunately the hosting company didn't bother to inform me so I have
several mail forms that no longer work.

I have used the code provided by my hosting company. (creating the object &
setting the fields), but I cant get the form to send a mail.

Is this an error in my code, their code or a problem with the server.

Any help would be greatly appreciated.

Thanks in advance.

J.

<%
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirecto
ry") = "c:\inetpub\mailroot\pickup"
Flds.Update


strBody = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf
strBody = strBody & "<html><head><title>Quote</title></head><body
bgcolor=silver><font face=arial size=3><p>Email from Fully Present Web
site</p> <p><b>Name:</b>&nbsp;"
strBody = strBody & strFromName
strBody = strBody & "</p><p><b>Email:</b>&nbsp;"
strBody = strBody & strFromEmail
strBody = strBody & "</p><p><b>Subject:</b>&nbsp;"
strBody = strBody & strSubject
strBody = strBody & "</p><p><b>Content:</b>&nbsp;<br>"
strBody = strBody & strContent
strBody = strBody & "</p><p><b>"
'strBody = strBody & strAdd
strBody = strBody & "to Mail List</b>&nbsp;</p></font></body></html>"



Set iMsg.Configuration = iConf
iMsg.To = "(e-mail address removed)"
iMsg.From = Trim(Request.Form("Email"))
iMsg.Subject = Trim(Request.Form("Subject"))
iMsg.TextBody = Trim(Request.Form("Content"))
iMsg.Send

Response.Redirect "thanks.asp"
Response.End

%>
 
M

monki

Ray

I do not receive any errors from the page, it runs through the code and then
redirects to the thanks.asp page.

I have tried changing the configuration fields but that allways gives a 500
error

J
 
M

monki

Ray

i think its a server problem, i have tried passing the strings into a
seperate page and they are ok, ive just set up iis on my pc and the page
runs fine and puts the message into the mail root\pickup folder

thanks for your suggestions

j
 
R

Ray at

If your messages are sitting in pickup, the SMTP service is not running, so
it sounds.

net start smtpsvc

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top