Hi,
I am trying to send webpage mail for nearly 5000 user using CDO
the users email in exist in ms sql database
do i need to use 3rd party application like aspmail or the code below is sufficient.
if i need 3rd party app how to link it to my code
[code]
%@LANGUAGE="VBSCRIPT" %>
<% Server.ScriptTimeout = 999999999 %>
<html>
<head>
<title>eng Oct </title>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-8-i"></head>
<body>
<%
if request.form.count=0 then
%>
<form action="cdo_eng_sys.asp" method="post">
<input name="email1" type="submit" value="send">
</form>
<%
'#####cheking for email true
'If Len(strReturnEmailAddress) < 5 OR NOT Instr(1, strReturnEmailAddress, " ") = 0 OR InStr(1, strReturnEmailAddress, "@", 1) < 2 OR InStrRev(strReturnEmailAddress, ".") < InStr(1, strReturnEmailAddress, "@", 1) Then
'strReturnEmailAddress = strMyEmailAddress
'End If
else%>
<%
Dim HTML, html2
%>
<%
sql="select * from UserList where ListType<3 and Lang=1;"
rs.Open sql, Conn,1,3
Dim objSendMail
while not rs.eof
Set objSendMail = CreateObject("CDO.Message")
objSendMail.from = "
[email protected]"
objSendMail.To = rs.fields("EmailAdress")
objSendMail.Subject = "@abc - The abc,Newsletter"
objSendMail.CreateMHTMLBody "http://www.abc.com/news/eng/asd.html"
objSendMail.BodyPart.Charset = "iso-8859-1"
objSendMail.ReplyTo = "
[email protected]"
objSendMail.Send
Set objSendMail = nothing
rs.movenext
wend
Response.Write "Email has been sent to"
%>
<%= rs.recordcount %>
<%=" recip" %>
<% End If %>
</body>
</html>
***********
the opendb1 code is :
<%dim conn,rs,str,sql
Str = "DSN=news; user Id=sa; password=xxx;"
Set conn=server.createobject("ADODB.Connection")
conn.open Str
set rs=server.CreateObject("ADODB.recordset")%>[code]