Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email.vbs error message

Status
Not open for further replies.

lud4352

Technical User
Mar 10, 2011
4
US
Help, I recently changed ISP and now I am not able to send any emails via website... Error message

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed

F:\0\2\11\1\4499164\USER\2789128\HTDOCS\ASP\../email.vbs, line 5
800401f3

This is a copy of my email.vbs file




<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub SendMail(ByVal strFrom, ByVal strTo, ByVal strSubject, ByVal strBody)
Dim objNewMail

Set objNewMail = Server.CreateObject("CDO.NewMail")

objNewMail.From = strFrom
objNewMail.To = strTo
objNewMail.Subject = strSubject
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
objNewMail.Body = strBody
objNewMail.Send

Set objNewMail = Nothing

End Sub
Sub SendHTMLMail(ByVal strFrom, ByVal strTo, ByVal strSubject, ByVal strBody)
Dim objNewMail

Set objNewMail = Server.CreateObject("CDO.NewMail")

objNewMail.From = strFrom
objNewMail.To = strTo
objNewMail.Subject = strSubject
objNewMail.BodyFormat = 0
objNewMail.MailFormat = 0
objNewMail.Body = strBody
objNewMail.Send

Set objNewMail = Nothing

End Sub

</SCRIPT>
 
The hosting server doesn't have Microsoft's email component, CDO. Or your new ISP is blocking calls to the CDO object?

-Geates

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding

"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon
 
Hi :) Try out this Solution with a form in HTA (HTML Application)

PIC201137630131613.jpg
 
Problem has been solved using CDOSYS

Set objMail = Server.CreateObject("CDO.Message")



objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.TextBody = strBody


objMail.Send

Set objMail = Nothing

End Sub
Dim objMail
Dim strHTML

Set objMail = Server.CreateObject("CDO.Message")

objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.HTMLBody = strBody
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top