<% Option Explicit %> <% 'Set the response buffer to true Response.Buffer = True 'Dimension variables Dim rsMailingListSetup 'Recorset holding all the username in the database Dim strMode 'holds the mode of the page, set to true if changes are to be made to the database Dim strUsername 'Holds the admin username Dim strPassword 'Holds the admin password 'If the session variable is False or does not exsist then redirect the user to the unauthorised user page If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then 'Redirect to unathorised user page Response.Redirect"unauthorised_user_page.htm" End If 'Read in the details from the form strUsername = Request.Form("username") strPassword = Request.Form("password") strMailComponent = Request.Form("component") strMailServer = Request.Form("mailServer") strWebSiteName = Request.Form("siteName") strWebsiteAddress = Request.Form("URL") strWebsiteEmailAddress = Request.Form("email") strTestEmailAddress = Request.Form("testEmail") strWelcomeMessage = Request.Form("welcome") strWelcomeFormat = Request.Form("format") strMode = Request.Form("mode") 'Intialise the ADO recordset object Set rsMailingListSetup = Server.CreateObject("ADODB.Recordset") 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblConfiguration.* From tblConfiguration;" 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsMailingListSetup.CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated rsMailingListSetup.LockType = 3 'Query the database rsMailingListSetup.Open strSQL, strCon 'If the user is changing the email setup then update the database If strMode = "change" Then 'If there is a welcome message then covert the line breaks to
if required If strWelcomeMessage <> "" AND strWelcomeFormat = "htmlBR" Then strWelcomeMessage = Replace(strWelcomeMessage, vbCrLf, "
", 1, -1, 1) strWelcomeFormat = "HTML" End If 'Update the recordset rsMailingListSetup.Fields("Username") = strUsername rsMailingListSetup.Fields("Password") = strPassword rsMailingListSetup.Fields("mail_component") = strMailComponent rsMailingListSetup.Fields("mail_server") = strMailServer rsMailingListSetup.Fields("website_name") = strWebSiteName rsMailingListSetup.Fields("website_address") = strWebsiteAddress rsMailingListSetup.Fields("website_email_address") = strWebsiteEmailAddress rsMailingListSetup.Fields("test_email_address") = strTestEmailAddress rsMailingListSetup.Fields("welcome_message") = strWelcomeMessage rsMailingListSetup.Fields("welcome_format") = strWelcomeFormat 'Update the database with the new user's details rsMailingListSetup.Update 'Re-run the query to read in the updated recordset from the database rsMailingListSetup.Requery End If 'Read in the deatils from the database If NOT rsMailingListSetup.EOF Then 'Read in the e-mail setup from the database strUsername = rsMailingListSetup("Username") strPassword = rsMailingListSetup("Password") strMailComponent = rsMailingListSetup("mail_component") strMailServer = rsMailingListSetup("mail_server") strWebSiteName = rsMailingListSetup("website_name") strWebsiteAddress = rsMailingListSetup("website_address") strWebsiteEmailAddress = rsMailingListSetup("website_email_address") strTestEmailAddress = rsMailingListSetup("test_email_address") strWelcomeMessage = rsMailingListSetup("welcome_message") strWelcomeFormat = rsMailingListSetup("welcome_format") End If 'Reset Server Objects Set adoCon = Nothing Set strCon = Nothing Set rsMailingListSetup = Nothing %> ASP Mailing List Setup

ASP Mailing List Setup

Return to the Mailing List menu Menu

Important - Please Read

To be able to use the e-mail notification you need to have CDOSYS, the CDONTS e-mail component, the W3 JMail component, or Persists AspEmail component installed on the web server.

Windows Win2k and XP Pro users - CDOSYS comes installed on Win2k and XP Pro.

Windows NT4 and Win2k users - IIS 4 and 5 on NT4 and Win2k instals the CDONTS e-mail component by default, but you need the SMTP server that comes with IIS installed on the web server as well (This is the e-mail component that most web hosts will use).

Windows 9x users - I'm afraid Windows 98 does not support the CDOSYS or CDONTS e-mail components so if you enable this feature and try to test it on a Windows 9x system the News will crash!!

The personal version of the JMail e-mail component is free and can run under Win98, NT4, and Win2k, Win XP, but you must install the component on the web server and requires that you enter the address of a working SMTP server.

If you are not sure what mail component, if any, your web host uses then contact them to find out.

If Web Wiz Site News crashes or you receive no e-mail's, you are either using the wrong component or your web host may not support sending mail from your web site.

*Indicates required fields
Username:
You must remember this otherwise you can't use the script
Password:
You must remember this otherwise you can't use the script
E-mail Component to use:
Check with your web host if you are unsure
Outgoing SMTP Mail Server (NOT needed for CDONTS):
You only need this if you are using an e-mail component other than CDONTS. It must be a working mail server or the script will crash.

(eg. mail.myweb.com)
Website name*
The name of your website or Company Name eg. My Website
Web address path to mailing list script*
The web address to this mail list script including web site URL. eg. http://www.mywebsite.com/mailing_list
Your Web Sites E-mail Address*
Without a valid e-mail address you wont be able to send e-mails from this script.
 
Preview E-mail Address*
This is the e-mail address you want to send a test e-mail to so you can view what the e-mail will look like before you send it to all your members.
Conformation/Welcome E-mail
If you would like a welcome message sent to new members then type your message that will be e-mailed to them in the box below.

>
>