Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: JMail and Object Required:" - Problem!!!


Message #1 by cw.inf@c... on Fri, 16 Nov 2001 11:12:44
I want to do bulk mail with jmail and follow the instructions from dimac. 



Well - it sayes in the manual: It is assumed you already have established 

a connection to your server and that the connection is called sqlCon (I 

call it objcon here!)



But I get an error!!!



It says: 

Microsoft VBScript runtime (0x800A01A8)

Object required: ''

/gem/adminweb/test2.asp, line 27





Line 27 says: 

objRs = objConn.execute("SELECT FullName, Email from RequestMaterial where 

EmailGemNews = true and TestUser = true")



Can you help me and tell what the problem is??



Regards, 



Chrilles - cw.inf@c...







<html>

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

<%

set objcon = server.createobject("ADODB.Connection")

objcon.open = "Provider=Microsoft.Jet.OLEDB.4.0; Data 

Source=D:\Inetpub\wwwroot\gem\base\gem.mdb; Persist Security Info=False"

Set objRs = Server.CreateObject("ADODB.Recordset")



Subject = request.form("txtSubject")

Body = request.form("txtBody")



set msgTemplate = Server.CreateObject("JMail.Message")

msgTemplate.Subject = Subject

msgTemplate.Body = Body

msgTemplate.From = "cw.inf@c..."

msgTemplate.FromName = "Global eManagement - Copenhagen Business School"

msgTemplate.AddRecipient "%%Email%%", "%%FullName%%"



set mMerge = Server.CreateObject("JMail.MailMerge")



mMerge.MailTemplate = msgTemplate



objRs = objConn.execute("SELECT FullName, Email from RequestMaterial where 

EmailGemNews = true and TestUser = true")

mMerge.BulkMerge objRs, false, "mail.cbs.dk"





%>

</body>

</html>

<%

objRs.Close()

objConn.Close()

%>

  Return to Index