Author |
Topic |
|
chinh10
Junior Member
125 Posts |
Posted - 13 July 2001 : 16:16:33
|
Do you know any way I can send email to the list of email in the email's column located in the MS Access Database? Thanks in advance!
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 13 July 2001 : 17:53:46
|
quote:
Do you know any way I can send email to the list of email in the email's column located in the MS Access Database? Thanks in advance!
Try this, im not brilliant at asp, but it may work, there might be some errors in it, i havent go time to check :(
<%
Dim DATAPATH DATAPATH = "C:/path to database"
Set MAILRS = Server.CreateObject("ADODB.Recordset") Set MAILDB = Server.CreateObject("ADODB.Connection") MAILDB.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DATAPATH & ";" SQL = "SELECT * from Email" MAILRS.Open SQL, MAILDB, 3, 1, 1
If MAILRS.EOF Then Response.Write "NO Records in Database" Response.End End If %>
<% Dim EMAILCOUNT EMAILCOUNT = MAILRS.Recordcount
Dim COUNTER COUNTER = 1 %>
<form name="form1" method="post" action="mail.asp"> <p><br> Recipients:
<input type="text" name="SENDTO" value="<% Do While NOT COUNTER > EMAILCOUNT Dim Email Email = MAILRS("Email") %> <%=EMAIL%><%If NOT (COUNTER = EMAILCOUNT) Then%>; <%End If%> <% COUNTER = COUNTER + 1 MAILRS.Movenext Loop %> "> </p> <p>Message: <textarea name="MESSAGE" cols="50" rows="10"></textarea> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> <% MAILRS.close Set MAILRS = Nothing MAILDB.close Set MAILDB = Nothing %>
Now Send all that off to a nice page that collects the info and sends the email out using CDONTS or JMAIL, whichever. You do know how to do that right???
Hope this helps, im sure ive made mistakes there somewhere, :)
Spoon
"uohh look at me, ive got a signature, uohh look at me!" :)
Edited by - spoon on 13 July 2001 17:55:17
Edited by - spoon on 14 July 2001 06:54:57 |
|
|
chinh10
Junior Member
125 Posts |
Posted - 16 July 2001 : 17:23:19
|
Hi Spoon,
I will try. Could you add some code for Jmail Component for your code (I am sorry I don't know how to modify your code to use Jmail)?
Thank again.
|
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 17 July 2001 : 07:03:30
|
quote:
Hi Spoon,
I will try. Could you add some code for Jmail Component for your code (I am sorry I don't know how to modify your code to use Jmail)?
Thank again.
Ill be making a mailing list for Jmail in about 2 weeks, if you can wait until then??
Reply back so i will know,
Regards,
Spoon, (ya all love me right?) |
|
|
chinh10
Junior Member
125 Posts |
Posted - 17 July 2001 : 15:44:18
|
thanks in advance!
|
|
|
chinh10
Junior Member
125 Posts |
Posted - 30 July 2001 : 01:37:31
|
quote:
Ill be making a mailing list for Jmail in about 2 weeks, if you can wait until then?? Reply back so i will know,
Regards, Spoon, (ya all love me right?)
Hi Spoon,
Any good news? Will the code work when I am using MS SQL7 ? I don't know?
Hope you don't forget ???
Thanks in advance!
|
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 30 July 2001 : 11:11:38
|
I havent forgot but i havent made it yet :(
Ive been snowed under with other work, just no spare time. I will make eventually though. Take a look at www.aspin.com and www.hotscripts.com for free scripts. They might have some there!
Hope this helps, sorry about the delay!
Regards - Spoon
Begineer? Need help installing the forums? - www.aslickpage.com/snitz_help.html
www.ASlickPage.com - Private Messaging |
|
|
chinh10
Junior Member
125 Posts |
Posted - 07 August 2001 : 12:52:06
|
Hi Spoon,
I couldn't find any script to do that If you know one, please let me know
Thanks!
|
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 07 August 2001 : 13:00:04
|
quote:
Hi Spoon,
I couldn't find any script to do that If you know one, please let me know
Thanks!
Ill take a look for one tonight? Anyone else know of any good ones?? (that use jmail or cdonts)
Regards - Spoon
Begineer? Need help installing the forums? - www.aslickpage.com/snitz_help.html
www.ASlickPage.com - Private Messaging |
|
|
|
Topic |
|