Link to home
Start Free TrialLog in
Avatar of jtuttle99
jtuttle99

asked on

IIS setting? error '8004020e'

Hello, experts

My company recently switched to a dedicated server, and I'm trying to set it up.
I uploaded all the files, set up database and everything looks good except sending e-mail and uploading comments to blog.
I get this error

error '8004020e'
/gallery/mailfriend.asp, line 105

It works fine with other webhost as well as local host.
Then, I google searched the error, but I got no much solution.

Do I have to set up something with IIS.
Some web page was talking about SMTP server, but I'm not familiar with server nor IIS.

Could someone tell me what need to be set up or possible solution?

Thank you
Avatar of RubalJ
RubalJ
Flag of India image

Seems like you are using CDOSYS mail component. Make sure you are specifinig SMTP Host Address along with port in your code.
ASKER CERTIFIED SOLUTION
Avatar of Sam Panwar
Sam Panwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jtuttle99
jtuttle99

ASKER

Hello, experts

Sorry for taking long time to reply.
I still have same problem, and I thought I should just post the code.
This code works fine with other web hosts.
I have to mention that we just moved DNS.
When I called our web host, they said it takes 48-72hrs to set up mail function.
I don't know enough to tell them, so I'm waiting.... It's been 12hrs...
	Dim objCDO, objCDOSYSCon, sender, subject, body, receiver, mail
	Dim iMsg, iConf
	Dim Flds
	body = "<html><link rel=""stylesheet"" href=""../include/style.css"" media=""screen"" type=""text/css""><body><span style=""FONT-SIZE: 12px; COLOR: #ab783a; FONT-FAMILY: trebuchet ms, arial, verdana, sans-serif;""><p>" & custName & " has updated their Design Page.</p><p>Click <a href='http://www.mydomain.com/maintain/bloghome.asp?custID=" & CustID & "' target='_blank'>here</a> to log into your blog and see the progress on your ring.</p></body></html>"
	sender = email
	subject = custName & " has posted to their Design Page"
		if empID <> "" then 
			dim sql2, rsEmail
			sql2 = "SELECT empEmail FROM Employees WHERE empID = " & empID
			set db = getDB()
			set rsEmail = getRS(db, sql2)
					if empID = "" or empID = "0" then
					receiver = "info@mydomain.com"
					else
					receiver = rsEmail("empEmail")
					end if
			CloseDB(db)
		else 
			receiver = "info@mydomain.com"
		end if		
 
	    Const cdoSendUsingPort = 2
	    Const strSmartHost = "smtp.mydomain.com"
	
	    'Create the message object.
	    Set iMsg = Server.CreateObject("CDO.Message")
	
	    'Create the configuration object.
	    Set iConf = iMsg.Configuration
	
	    'Set the fields of the configuration object to send by using SMTP through port 25.
	    With iConf.Fields
	       .item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
	       .item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
	       .Update
	    End With
	
	    'Set the To, From, Subject, and Body properties of the message.
	    With iMsg
	       .To = receiver
	       .From = sender
	       .Subject = subject
	       .HTMLBody = body
	       .Send
	    End With
	    set iMsg = Nothing
		Set objCDO = nothing

Open in new window