Hej alle
Jeg har et underligt problem med CDO
Med nedstående script kan jeg sende til de 2000 perosner jeg har i min db
(access 2000)
Men så stopper CDO med en fejl
Fejltype:
CDO.Message.1 (0x8007000E)
Not enough storage is available to complete this operation.
/Adres/sendMail4.asp, line 104 '( som er html filen )
Da jeg har masser af HD plads og 1.5 gb ram og ikke kan finde det omtalte
problem via google
vil jeg høre om nogen kan hjælpe ???
Mvh
Rene
---------------------------------------- < ASP SCRIPT
> ------------------------------------------------
<%@ LANGUAGE="VBSCRIPT" %>
<%option explicit%>
<!--#include file="conn.inc"-->
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
dim conn, rs, infostatus, i, infobrev, all_email, sqlStr, delimiter,
rsinfostatus, info
set conn = server.createObject("ADODB.Connection")
conn.open connString
set rsInfostatus = conn.execute ("SELECT * FROM infostatus")
if request.form("cmdSend") <> "" then
infostatus = request.form("combo_info")
if infostatus = 1 then
infobrev = "intro"
else
infobrev = "info" & infostatus
end if
set rs = conn.execute ("SELECT id,infostatus,firmanavn,email FROM adresser
WHERE infostatus = " & infostatus)
end if
%>
<html>
<head>
<title>Send e-mail</title>
<link rel="stylesheet" href="pd.css">
</head>
<body topmargin="10" leftmargin="4" bgcolor="#0099CC">
<form method="post" action="sendMail5.asp">
<hr>
TEST:<br>
infostatus: <%=infostatus%><br>
vedhæftet fil: <%=infobrev%><br>
<a href="sendmail5.asp">Send igen</a><center><%=info%></center><br><hr>
<hr>
Send
<select name="combo_info" size="1">
<option value="1" <%if infostatus = 1 then
response.write("selected")%>>Introbrev</option>
<%for i = 2 to 10%>
<%if clng(infostatus) = clng(i) then%>
<option value="<%=i%>" selected><%=i-1%>. infobrev</option>
<%else%>
<option value="<%=i%>"><%=i-1%>. infobrev</option>
<%end if%>
<%next%>
</select>
<input type="submit" value="Send" name="cmdSend" class="knap">
</form>
<hr>
<B>
Sender til:<br>
<%
all_email = ""
delimiter = ""
if isobject(rs) then
while not rs.eof
response.write(rs("firmanavn") & " - " & rs("email") & "<br>")
if not isnull(rs("email")) then all_email = all_email & delimiter &
rs("email")
delimiter = "; "
sqlStr = "UPDATE adresser SET infostatus = " & rs("infostatus") + 1 & "
WHERE id = " & rs("id")
' response.write(sqlStr & "<br>")
conn.execute sqlStr
Rs.movenext
wend
sendmail
end if
sub sendmail
IF NOT all_email = "" then
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smpt.mail.dk"
.Update
End With
With iMsg
Set.Configuration = iConf
.To = test@test ' er bare fiktiv
.bcc = all_email
.From = test@test ' er bare fiktiv
.Subject = "This is a test mail (PLEASE DELETE IT)"
.CreateMHTMLBody ("
http://eget_domaine/test.htm")
' .TextBody = ""
' .AddAttachment("c:\test.doc")
.Send
End With
else
info = "Du har sendt denne Intro eller Info Email til alle"
end if
end sub
%><br></B>
<font face="Tahoma" font color="FFFF00" size="5"><center>
<%=info%><br></center></font>
<hr>
</body>
</html>
<%
on error resume next
rs.close
set rs = nothing
conn.close
set conn = nothing
on error goto 0
%>