Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: problem in creating an cdont object


Message #1 by "anandhi" <anandhi.p@u...> on Wed, 14 Feb 2001 06:40:20
Hi,

   when i create an cdont object i get the error Activex component cannot 

create object.will there be any problem in SMTP.

      Please help me out.

anandhi



<%Option Explicit %>



<%

  Dim strFrom

  Dim strSubject

  Dim strMessage

  

  

  Dim objCDO

  

  strFrom=Request.Form("txtFrom")

  strSubject=Request.Form("txtSubject")

  strMessage=Request.Form("txtAreaMessage")

  

  Response.Write("strFrom" & strFrom & "<br>")

  Response.Write("strSubject" & strSubject & "<br>")

  Response.Write("strMessage" & strMessage & "<br>")

  

  

  if(strFrom <> "" and strSubject <> "" and strMessage <> "") then

      

      On Error Resume Next 



	Set objCDO = CreateObject("CDONTS.NewMail")

	

	objCDO.To="anandhi.p@u..."

	objCDO.From=strFrom

	objCDO.cc="mailto_anandhi_p@r..."

	objCDO.Subject=strSubject

	objCDO.Body=strMessage

		

	objCDO.Send

      

                 

	If err.number <> 0 then 

	Response.Write CStr(err.number) + " : " + err.description + 

err.Source

	Response.End 

	end if



	Response.Redirect "Error.asp?strErrMsg=Your%20Mail%20has%been%

20sent.&frmpg=mailConfirm"

  End If

	

	

  

 

%>

Message #2 by "Mail from EDP at NCC" <edp_ncc@s...> on Wed, 14 Feb 2001 12:41:05 +0530
Hi,



First I know Whether You have an access with NT or Your Pc.

If you have an access with NT, change the statement as follows.



Set objCDO = Server.CreateObject("CDONTS.NewMail")



R.M.Kumaravelu



----- Original Message -----

From: "anandhi" <anandhi.p@u...>

To: "ASP CDO" <asp_cdo@p...>

Sent: Wednesday, February 14, 2001 6:40 AM

Subject: [asp_cdo] problem in creating an cdont object





> Hi,

>    when i create an cdont object i get the error Activex component cannot

> create object.will there be any problem in SMTP.

>       Please help me out.

> anandhi

>

> <%Option Explicit %>

>

> <%

>   Dim strFrom

>   Dim strSubject

>   Dim strMessage

>

>

>   Dim objCDO

>

>   strFrom=Request.Form("txtFrom")

>   strSubject=Request.Form("txtSubject")

>   strMessage=Request.Form("txtAreaMessage")

>

>   Response.Write("strFrom" & strFrom & "<br>")

>   Response.Write("strSubject" & strSubject & "<br>")

>   Response.Write("strMessage" & strMessage & "<br>")

>

>

>   if(strFrom <> "" and strSubject <> "" and strMessage <> "") then

>

>       On Error Resume Next

>

> Set objCDO = CreateObject("CDONTS.NewMail")

>

> objCDO.To="anandhi.p@u..."

> objCDO.From=strFrom

> objCDO.cc="mailto_anandhi_p@r..."

> objCDO.Subject=strSubject

> objCDO.Body=strMessage

>

> objCDO.Send

>

>

> If err.number <> 0 then

> Response.Write CStr(err.number) + " : " + err.description +

> err.Source

> Response.End

> end if

>

> Response.Redirect "Error.asp?strErrMsg=Your%20Mail%20has%been%

> 20sent.&frmpg=mailConfirm"

>   End If

>

>

>

>

> %>

>

Message #3 by "Anand [EG-GOE]" <anand@s...> on Wed, 14 Feb 2001 15:22:08 +0800
Use Server.CreateObject("CDONTS.NewMail") instead just Creatobject.



I think it may work out.



Anand





> -----Original Message-----

> From: anandhi [mailto:anandhi.p@u...]

> Sent: Wednesday, February 14, 2001 6:40 AM

> To: ASP CDO

> Subject: [asp_cdo] problem in creating an cdont object

> 

> 

> Hi,

>    when i create an cdont object i get the error Activex 

> component cannot 

> create object.will there be any problem in SMTP.

>       Please help me out.

> anandhi

> 

> <%Option Explicit %>

> 

> <%

>   Dim strFrom

>   Dim strSubject

>   Dim strMessage

>   

>   

>   Dim objCDO

>   

>   strFrom=Request.Form("txtFrom")

>   strSubject=Request.Form("txtSubject")

>   strMessage=Request.Form("txtAreaMessage")

>   

>   Response.Write("strFrom" & strFrom & "<br>")

>   Response.Write("strSubject" & strSubject & "<br>")

>   Response.Write("strMessage" & strMessage & "<br>")

>   

>   

>   if(strFrom <> "" and strSubject <> "" and strMessage <> "") then

>       

>       On Error Resume Next 

> 

> 	Set objCDO = CreateObject("CDONTS.NewMail")

> 	

> 	objCDO.To="anandhi.p@u..."

> 	objCDO.From=strFrom

> 	objCDO.cc="mailto_anandhi_p@r..."

> 	objCDO.Subject=strSubject

> 	objCDO.Body=strMessage

> 		

> 	objCDO.Send

>       

>                  

> 	If err.number <> 0 then 

> 	Response.Write CStr(err.number) + " : " + err.description + 

> err.Source

> 	Response.End 

> 	end if

> 

> 	Response.Redirect "Error.asp?strErrMsg=Your%20Mail%20has%been%

> 20sent.&frmpg=mailConfirm"

>   End If

> 	

> 	

>   

>  

> %>

> 


  Return to Index