| i NEED TO BE ABLE TO FILL OUT THIS FORM AND IT SEND A NEWSLETTER IT SENS THE NEWSLETTER OK BUT IT DOES NOT PIVCK UP THE TEXT IN THE INPUT BOX. HERE IS THE CODE.
<%
' change to address of your own SMTP server
strHost = "mail6.hollisterwebhosting.com"
%>
<HEAD>
<TITLE>Newsletter</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<%
' connect to the MS Access database in the same directory
strDbPath = Server.MapPath(".") & "\fpdb\newsletter.mdb"
ConnectStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & strDbPath
Set rs = Server.CreateObject("adodb.recordset")
rs.Open "clientname", ConnectStr, 2, 3
If Request("Send") <> "" Then
' send email to all users
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = strHost
Mail.From = "info@uniqueimpressionsstamps.com"
Mail.FromName = "info@uniqueimpressionsstamps.com"
Mail.AddReplyTo Request("From")
Mail.Subject = "Newsletter From Unique Impressions Stamps!"
Mail.Body = ""
' read address from DB and put them in the BCC field
While not rs.EOF
Mail.AddBcc rs("cemail"), rs("cname")
rs.MoveNext
Wend
If Request("Queue") <> "" Then
Mail.Queue = True
End if
' finally: send message
Mail.Send
Response.Write "Success!"
Else
' simply display the list of users in the database
Response.Write "<B>Currently in the user database:</B><P>"
While not rs.EOF
Response.Write rs("cemail") & " (" & rs("cname") & ")<BR>"
rs.MoveNext
Wend
End If
%>
<FORM>
Enter email: <textarea rows="16" name="Newsletter" cols="65"></textarea>
Send to Queue: <input type="checkbox" name="Queue" checked value="ON"><BR>
<INPUT TYPE=SUBMIT NAME="Send" VALUE="Send a message to them all">
</FORM>
</BODY>
</HTML> |