Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Send email to the list email in MSAccess Database?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chinh10
Junior Member

125 Posts

Posted - 13 July 2001 :  16:16:33  Show Profile
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  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
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
Go to Top of Page

chinh10
Junior Member

125 Posts

Posted - 16 July 2001 :  17:23:19  Show Profile
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.


Go to Top of Page

Spoon
Average Member

Ireland
507 Posts

Posted - 17 July 2001 :  07:03:30  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
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?)
Go to Top of Page

chinh10
Junior Member

125 Posts

Posted - 17 July 2001 :  15:44:18  Show Profile
thanks in advance!


Go to Top of Page

chinh10
Junior Member

125 Posts

Posted - 30 July 2001 :  01:37:31  Show Profile
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!

Go to Top of Page

Spoon
Average Member

Ireland
507 Posts

Posted - 30 July 2001 :  11:11:38  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
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
Go to Top of Page

chinh10
Junior Member

125 Posts

Posted - 07 August 2001 :  12:52:06  Show Profile
Hi Spoon,

I couldn't find any script to do that
If you know one, please let me know

Thanks!

Go to Top of Page

Spoon
Average Member

Ireland
507 Posts

Posted - 07 August 2001 :  13:00:04  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07