Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2007, 01:52 AM
pal pal is offline
Registered User
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default urgent help

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 = "news@abc.com"
        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 = "info@abc.com"
        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]







Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent deb_kareng ASP.NET 2.0 Professional 1 August 13th, 2007 07:29 AM
it's urgent deb_kareng ASP.NET 2.0 Professional 3 August 7th, 2007 07:40 AM
urgent help yash_coolbuddy_forindia BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 May 7th, 2007 08:40 AM
urgent???????????? nsr35 Beginning VB 6 1 October 3rd, 2005 10:57 AM
urgent ??????????????? nsr35 Pro VB Databases 0 October 3rd, 2005 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.