|
|
|
|
|
| | |
| |
Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
|
|
Subject: |
Re: A problem with the code |
|
From: |
Chad |
|
Date: |
4/19/1999 1:30:33 PM |
|
IP: |
208.229.240.131 |
Just taking a wuick glance at the code -- here is what I would change. I think that you a going about it a litte strange .... too many DB hits. Just do it once and Loop.
<%
If Request.form("m") = "" Then
%>
<form action="send.asp" method="Post">
<textarea cols=30 rows=15 name=m></textarea><br>
<input type=submit value=Send><br>
</form>
<% Else
Set A = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
Dim myMail
Set myMail = Server.CreateObject("CDONTS.NewMail")
Newln = Chr(10) & Chr(13)
Dim m
m = Request.form("m")
A.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.Mappath("./Oded.mdb")
Set RS = A.Execute("SELECT * from ml)
If Not RS.EOF Then
RS.Movefirst
Do While Not RS.EOF
myMail.from = "yiftach@callmanage.co.il"
myMail.To = RS("email")
myMail.Subject = "Mailing List"
myMail.Body = m & Newln & "-------------------------------"
myMail.Send
RS.MoveNext
Loop
End If
Set myMail = Nothing
RS.Close
Set RS = Nothing
End If
%>
|
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|