Important alert: (current site time 7/15/2013 11:42:57 PM EDT)
 

winzip icon

ASP Mailing List v1.1

Email
Submitted on: 6/10/2003 5:00:12 PM
By: Grahame Coyle 
Level: Advanced
User Rating: By 24 Users
Compatibility: ASP (Active Server Pages), HTML
Views: 30660
(About the author)
 
     Application Update from v1.0. This code provides a set of pages to allow your site visitors to Subscribe or Unsubscribe to mailing lists on your site. There are several changes to the code from version v1.0. Administration functions are provided to; manage those charged with administering the lists, manage the list members, manage available mailing lists, manage archived emails sent using the code, manage the email signatures, manage the 'From' email address, and send bulk email to the list members using CDONTS. The code if fully commented and uses an Access 2000 database. Extract everything to your server and edit some constants at the top of the 'includes/_configuration.asp' page. To access the pages start at 'aspmaillist/default.asp'. The interface isn't intended to suit any site, rather the pages can be easily customized to suit your needs.

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' for :ASP Mailing List v1.1
'**************************************
Copyright 2003 Grahame Coyle. All rights reserved, all wrongs denied. No warranty implied or included.
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/10/2003 8:29:02 PMGrahame Coyle

This is a new version of my original ASP Mailing List v1.0. It contains several new features and incorporates suggestions from PSC members. Any other comments / suggestions warmly welcomed.
(If this comment was disrespectful, please report it.)

 
6/12/2003 7:53:19 PM

I love the Gui. And 5* attached.
(If this comment was disrespectful, please report it.)

 
6/18/2003 9:55:27 PM

Pretty nice.
(If this comment was disrespectful, please report it.)

 
6/28/2003 11:47:19 PM

perfect apart from i get an error when i goto submit a new email entry ... on line 46 of the subscribe_process.asp objConn.Execute (strSQL)
(If this comment was disrespectful, please report it.)

 
6/29/2003 5:52:44 PMGrahame Coyle

If you can post the rest of the error message and some information about the parameters you entered to subscribe to the mailing list then I'll look into the problem.
(If this comment was disrespectful, please report it.)

 
8/2/2003 9:10:57 AMHTML Dude

Most excellent dude. Have been searching for something like this and although I don't need all of it, its a great source of reference. Cheers and kind of you to share this code, a full five from me.
(If this comment was disrespectful, please report it.)

 
8/2/2003 9:13:04 AMHTML Dude

Sory can't see the pic (to lace my vote), will definately come back and vote for this tho. Keep up the good work dude.
(If this comment was disrespectful, please report it.)

 
8/9/2003 12:11:29 PMWayne & Carr Barron

This is a very nice script so far...
But I keep on getting all sorts of errors in the Scripts....

Example:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Remove'

/Mailing/admin.asp, line 96

----------
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Remove'

/Mailing/admin_login_manage.asp, line 382
----------

Plus some more...

Any idea's on why this is happening?
It seems that it is not effecting the way that it works. But the messages are only located at the bottom of the page. But as mentioned, I can still conduct my Administrative Duties ...

Wayne & Carr Barron
Carrz-Fox-Fire Promotions
(If this comment was disrespectful, please report it.)

 
8/9/2003 2:18:46 PMGrahame Coyle

Those two lines are as follows:

Session.Contents.Remove ("strMessage")

The 'Session.Contents.Remove' part of the code will only work for ASP v3.0 on IIS v5, v5.1 and v6. What platform are you running the scripts on? You could change all the lines like this to

Session ("strMessage") = ""

but that won't actually free up the memory space associated with the Session variable, it only removes the variable contents. Email me if you have any more trouble.
(If this comment was disrespectful, please report it.)

 
8/21/2003 12:03:53 AM

This is a God Send for me, one of the few easy to install and tweak mailing lists available, in my price range at least.

Is there anyway to put html code in or is it strictly text messages only?
(If this comment was disrespectful, please report it.)

 
8/25/2003 1:00:34 AM

Has anyone adapted this for ASPEmail? My host doesnt use cdonts.
(If this comment was disrespectful, please report it.)

 
8/25/2003 9:10:58 PMGrahame Coyle

It should be pretty easy to adapt the script yourself to use ASPEmail rather than CDONTS.

You'd need to edit parts of the following files (the only files that use CDONTS).

subscribe_process.asp
unsubscribe_process.asp
admin_newmail_proces s.asp

The
parts of the script that handle email sending are fairly obvious and the changes shouldn be easy to implement. Best of luck. I will look at adding an option to specify which mail handler to use in my next version.
(If this comment was disrespectful, please report it.)

 
8/28/2003 5:46:22 PM

This whole thing is great. But I was wondering, when the
(If this comment was disrespectful, please report it.)

 
9/8/2003 6:45:53 PM

When the "suscribe_process.asp" creates the confirmation email, each line is about 72 characters long in the body text. I need to include a URL in a string that is longer than 72 and the remainder of the URL is detatched and dropped to the next line. Is there any way to lengthen the line?

Thanks
(If this comment was disrespectful, please report it.)

 
9/8/2003 9:34:22 PMGrahame Coyle

That's a built in 'feature' of CDONTS I'm afraid. You can read about it on the Microsoft Knowledgebase at

http://support.microsoft.com/default.aspx?scid=kb;en-us;201352
(URL may wrap)

They provide some code that will help you workaround the problem towards the bottom of the page. Let me know if you hit any more problems.
(If this comment was disrespectful, please report it.)

 
9/18/2003 6:53:02 AM

Is there anyway to place a link in the confirmation email, generated by the subscribe_process.asp, that contains the query string "u". For example it could read, "If you would like to update you information, click here: http://www.mysite.com/subscribe.asp?u=983040".

Thanks,
Larry
(If this comment was disrespectful, please report it.)

 
9/18/2003 10:19:27 AMGrahame Coyle

That would be possible. I'll have a look at the code on that page and get back to you. Have you made any changes to the code in that page? If not then I can create a custom version for you and send it across with the change you requested. If you have customised the page then please email me a copy that I can amend and return.
(If this comment was disrespectful, please report it.)

 
10/8/2003 11:28:43 AM

Hello graham, Gr8 Work. Have 1 question though can i make it to work on a sql database and if yes what do i need to change in order to make it work. I will greatly aprrciate ur help.I am not a programmer myself but ur commets of the code were really gr8.
Thanks a lot
Satish.
(If this comment was disrespectful, please report it.)

 
10/11/2003 4:21:20 PM

This is very nice. I appreciate that it archives previous newsletters! The only problem I'm having with it is that it won't allow me to edit the admin logins...which is no big deal...just do them in access or another table editing script.
(If this comment was disrespectful, please report it.)

 
10/12/2003 2:09:47 PMGrahame Coyle

Don't know why you're having problems editing the logins. Can you email me some more details of the errors you receive? You should be able to add/edit/delete any logins that you create or that exist in the version posted.
(If this comment was disrespectful, please report it.)

 
11/29/2003 9:03:58 PM

OK, I found the problem with editing admin logins...I just didn't have some files in the correct folders. All fixed now. :)
(If this comment was disrespectful, please report it.)

 
1/15/2004 9:05:36 AM

I was wondering about adding attachments to any newsletter one may send out. Also how are things going with the new release?
(If this comment was disrespectful, please report it.)

 
2/2/2004 6:16:58 PM

Professional strength code. Great interface. Super email support from author. One of this site's best codes!

Thank you Grahame
(If this comment was disrespectful, please report it.)

 
2/16/2004 6:56:38 AM

Hi, I've just downloaded your script and put it on my web server over the internet. but I found some problem with submitting process and sending email to member. would you help me with these problems.
This is my address : http://www.khalilpour.com/Mailing_List/default.asp
(If this comment was disrespectful, please report it.)

 
4/20/2004 4:30:26 AM

This is great! Easy to install, easy to use .. nice work. For the benefit of the guy above who wanted to know how to use ASPEmail:

Open up subscribe_process.asp

Near the bottom of the code, create an instance of ASPEmail by changing the line:

Set cdoEmail = CreateObject ("Persits.MailSender")

A few properties are slightly different, change the next few lines:

cdoEmail.From = strEMailFromName
cdoEmail.FromName = StrMailFromName '& "<" & strEMailFromName & ">"
cdoEmail.AddAddress (strEmail)
cdoEmail.Host="smtp.myemailserver.com"

(of course, change the host to your own e-mail server)

Everything else will be ok as it is.

Do the same to unsubscribe_process.asp and admin_newmail_process.asp and hey presto - mailing list for ASPEmail!

:D

(If this comment was disrespectful, please report it.)

 
6/24/2004 7:17:10 AM

Hey, I'm a beginner and I have always the same problem when I wish to use asp writing to database...
I have always the message : Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][Pilote ODBC Microsoft Access] L'opération doit utiliser une requête qui peut être mise à jour.

/asp/aspmaillist/subscribe_process.asp, line 46

Do you have an idea ?
(If this comment was disrespectful, please report it.)

 
9/14/2004 6:36:35 PM

Great,great..great
(If this comment was disrespectful, please report it.)

 
10/12/2004 5:20:49 PMLupo

Hi Grahame,
this code is just great! Unfortunately I can give only 5*. If I could, I would give more.
I have a problem with the function "List Duplicate Entries". The function shows among other duplicate entries, three records which are only once in the database. OK, I've changed the "ORDER BY" in the file "admin_duplicates_manage.asp" from ListID, Email, FirstName,e, LastName to Email, ListID, LastName, FirstName. IMHO, this change can not cause the above mentioned "error". There are about 430 records in the table "maillist_members". Do you have any idea what the problem could be?
Thanks for yr reply.
rgds
Lupo
(If this comment was disrespectful, please report it.)

 
10/12/2004 6:49:05 PMGrahame Coyle

Try inserting the following code between (and including) lines 18 to 32 in the "admin_duplicates_manage.asp" page.

strSQL = "SELECT " &_
"maillist_members.memID, " &_
"maillist_members.Salutation, " &_
"maillist_members.FirstName, " &_
"maillist_members.LastName, " &_
"maillist_members.Email, " &_
"maillist_members.listID, " &_
"maillist_members.JoinDate, " &_
"maillists.listName " &_
"FROM maillist_members INNER JOIN maillists ON " &_
"maillist_members.listID = maillists.listID " &_
"WHERE maillist_members.FirstName IN " &_
"(SELECT FirstName FROM maillist_members AS Tmp GROUP BY FirstName, LastName, Email " &_
"HAVING Count(*) > 1 AND Lastname = LastName AND Email = Email) " &_"ORDER BY maillist_members.listID ASC"

Hopefully this is what you're looking for...
(If this comment was disrespectful, please report it.)

 
10/12/2004 6:49:33 PMGrahame Coyle

Wow, the formatting of the above code
has "changed" a little since I posted
it, hopefully you can cut 'n paste it
and straighten it out a little ;-)
(If this comment was disrespectful, please report it.)

 
10/19/2004 3:28:25 PMGrahame Coyle

UPDATE !
I've got a couple of new files I can send for the admin_duplicates_manage.asp and send for the admin_duplicates_process.asp pages, if anyone's interested.
(If this comment was disrespectful, please report it.)

 
12/2/2004 4:21:02 PM

I tried using the code mentioned above for sending ASPEmail. However, I am getting the following error. Any help would be appreciated:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'to'

/aspmaillist/subscribe_process.asp, line 95

Here is the code:

cdoEmail.FromName = StrMailFromName '& "<" & strEMailFromName & ">"
cdoEmail.AddAddress(strEmail)
cdoEmail.Host="mail.adminsites.com"

cdoEm ail.to
= strSalutation & " " & strFirstName & " " & strLastName & "<" & strEmail & ">"
cdoEmail.subject = "Mailing List Subscribe Confirmation"
cdoEmail.body= "Dear " & strSalutation & " " & strFirstName & " " & strLastName _

...rest of code


(If this comment was disrespectful, please report it.)

 
12/2/2004 4:35:10 PMGrahame Coyle

If you're using ASPEmail

cdoEmail = Server.CreateObject("Persits.MailSender") )

then you can't use 'to', you will have to use the following (I think this is correct but you should check with the APSEmail user instructions).

cdoEmail.AddAddress strEmail, strSalutation & " " & strFirstName & " " & strLastName

I don't know how ASPEMail will handle the second part of the above string, you might have to save the salutation and name as a temporary string and use the temporary string name after the "strEmail, " part of this code. Hope that helps.
(If this comment was disrespectful, please report it.)

 
12/2/2004 4:36:18 PMGrahame Coyle

Oops, one wrong bracket above

cdoEmail =
Server.CreateObject("Persits.MailSender"
)
(If this comment was disrespectful, please report it.)

 
12/5/2004 10:55:07 AM

Hi Grahame,
this code is great!
Has anyone adapted this for Jmail?
My host doesnt support cdonts.
kind regards, Helmut from Denmark

(If this comment was disrespectful, please report it.)

 
12/5/2004 7:06:50 PMGrahame Coyle

I don't know if anyone has adapted this already, but you could try it yourself.

There are three pages that reference the CDONTS object.

admin_newmail_process.asp
(Line 178 to 233)

unsubscribe_process.asp
(Line 41 to 59)

subscribe_process.asp
(Line 85 to 103)

It should be simple enough to recode it for JMail.
(If this comment was disrespectful, please report it.)

 
1/31/2005 4:45:08 AM

Very godd for my Assignments
(If this comment was disrespectful, please report it.)

 
2/23/2005 2:47:45 PM

What account is used to write/modify the DB? I can give the Everyone account read/write/modify but that seems like a nice security risk. I put read/write on that directory under Internet Manager and it still would not work. Does anyone know what account is used?
Thanks

(If this comment was disrespectful, please report it.)

 
5/7/2005 12:11:00 PM

Have anyone recoded this for Jmail? If so, is there anywhere I can get it/download it? I love this newsletter, but I can't use it because my webhotel doesn't support it :(
(If this comment was disrespectful, please report it.)

 
5/7/2005 9:23:54 PMGrahame Coyle

You should be able to recode this for JMail quite easily, there are only a could of pieces of script on a few pages that actually send email.
(If this comment was disrespectful, please report it.)

 
5/8/2005 4:35:26 AM

Thanks Grahame, I saw that in a earlier message. But I don't know anything about how to recode. Do you have any links to me where I can read about this`? I've tried to search but couldn't find anything of help.
(If this comment was disrespectful, please report it.)

 
5/8/2005 5:09:45 AMGrahame Coyle

http://www.dimac.net/ has some tutorials on the correct code to use, and I've listed the pages that would need to be recoded in an earlier message. Let me know how you get on
(If this comment was disrespectful, please report it.)

 
5/8/2005 7:14:50 AM

Hello again! I don't undersand this.. I've tried to use this code in the subs.process.asp file, but get
(If this comment was disrespectful, please report it.)

 
5/8/2005 7:16:33 AM

Sorry, it didn't work out the show you the code...I get this error anyway:
Variable is undefined: 'jmail'
and its pointing to this line "Set jmail = Server.CreateObject("JMail.Message")"
(If this comment was disrespectful, please report it.)

 
3/15/2006 11:41:56 AM

Running 2003 w/ Exchnge 2003.
Gave RW to Everyone on the _data folder.
Also I couldn't get CDONTS to work. I found some info on using CDONTS that stated there should be a cdont.dll file, which my server did not have. I also found that cdonts have been replaced with CDO. I am also running Exchange 2003 on this box and the following is what I found to work for the mail part:
Dim objMail
Set objMail= Server.CreateObject("CDO.Message")
With objMail
.From =
.To =
.Subject =
.TextBody =
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserv er")
= "servername"
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configurati on/smtpserverport")
= 25
.Configuration.Fields.Update
.Send
End With

The format and strings used for To: From: etc all worked, so none of that had to be altered.

Thanks
(If this comment was disrespectful, please report it.)

 
4/28/2006 4:49:33 AMreha

hai...i dont know on how to connect to the server..could you please show it to me...
do i need to install the SQL server
(If this comment was disrespectful, please report it.)

 
10/21/2006 7:39:26 AMMex Young

wsh to have this version in ASPEMail. the mentione code aove doesn't seem to work well.
(If this comment was disrespectful, please report it.)

 
3/11/2012 1:11:30 PMJoe

I have two problems. First, I don't need my customers to have to enter all the other required info, such as name, salutation. How can I disable those?

And I get this error when I tried to test add an email:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

/test/subscribe_process.asp, line 46

Thanks.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.