Web Hosting Forums Web Discussions on Hosting Webmaster forums Web Hosting Forums Domain Name Forums Web Hosting

Old 09-13-2007, 04:19 AM   #1 (permalink)
HWHT Starter
Join Date: Sep 2007
Location: Hollister MO
Posts: 3
Tanner is on a distinguished road
ASp Mail and Database

I NEED TO BE ABLE TO FILL OUT THIS FORM AND IT SEND A NEWSLETTER. IT PULLS OUT THE EMAIL ADDRESS AND SENDS THE MAIL BUT IT DOES NOT PICK 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>
Tanner is offline  
profile.gif sendpm.gif find.gif Reply With Quote
Old Sponsored Ads   # a.
Ads
Hosting Master
Join Date: Feb 2006
Location: HWHT
Posts: 1100
Ads is on a distinguished road



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
AdsPromoter is online
profile.gif sendpm.gif email.gif find.gif buddy.gif Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Te$ter Technical & Security Issues 5 07-28-2006 04:24 PM
how to find database server name or ip seohyderabad Programming Discussion 3 05-15-2006 08:26 AM
Free database (mySql) hosting xammy Web Hosting Forum 4 10-13-2005 02:42 AM


All times are GMT. The time now is 10:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.