<%@LANGUAGE="VBSCRIPT"%> <% On Error Resume Next %> <% MM_editRedirectUrl = "index.asp" %> <% If Request.QueryString("ID") <> "" Then strTo = Request.QueryString("ID") strCC = "" strSubject = "Welcome to The Glass Forum [www.theglassforum.co.za]" 'Display the contents strBody = "" strBody = strBody & "This message is an auto-generated email, please do not reply to this address as it is not monitored for incoming mail. If you have any queries, please contact info@theglassforum.co.za

" strBody = strBody & "In order to use your username and password to login, you first need to activate your account by clicking on the following link or copying it into you address bar in your web browser.
" strBody = strBody & "http://www.theglassforum.co.za/activate.asp?K=" & Request.QueryString("K") & "

" strBody = strBody & "Your username and password is stated below.

" strBody = strBody & "Username: " & Request.QueryString("U") & "
" strBody = strBody & "Password: " & Request.QueryString("P") & "

" strBody = strBody & "Thank you so much for utilising The Glass Forum.
" strBody = strBody & "Kind Regards,
" strBody = strBody & " The Glass Forum Webmaster" Else Response.Redirect(MM_editRedirectUrl) End If If strTo = "" Then Response.Redirect(MM_editRedirectUrl) End If If strTo = strCC Then 'Don't want to receive the email more than once... strCC = "" End If If Err.Number <> 0 Then Response.Write("An error occured while creating the notification email...
") Response.Write("Error Description: " & Err.Description & "
") Response.Write("Please contact the systems administrator and quote the above message.
") Response.End() End If If strTo = "" Or NOT IsValidEmail(strTo) Then Response.Write("Email address cannot be blank or is an invalid email address. Please contact the system administrator [" & strTo & "]
") Response.End() Else ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") 'Server.CreateObject("CDO.Message")' ' This gets you the appearance of a real name! objCDOMail.From = "[The Glass Forum] " objCDOMail.To = strTo objCDOMail.CC = strCC 'objCDOMail.Importance = iImportance '(0=Low, 1=Normal, 2=High) 'objCDOMail.Host = "smtp.beadforum.co.za" objCDOMail.Subject = strSubject objCDOMail.BodyFormat = 0 objCDOMail.Body = strBody objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.beadforum.co.za" 'Server port objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Set the SMTP auth type to Basic (1) objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'Set the SMTP auth Username objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "webmaster@beadforum.co.za" 'Set the SMTP auth Password objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "j236hpg4q2" objCDOMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False objCDOMail.Configuration.Fields.Update 'objCDOMail.Cc = "user@domain.com;user@domain.com" 'objCDOMail.Bcc = "user@domain.com;user@domain.com" 'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt" 'objCDOMail.BodyFormat = 0 ' CdoBodyFormatHTML 'Outlook gives you grief unless you also set: 'objCDOMail.MailFormat = 0 ' CdoMailFormatMime objCDOMail.Send() Set objCDOMail = Nothing If (Err.Number <> 0) AND (Err.Description <> "Object required") Then Response.Write("An error occured while sending the notification email...Possible email server error.
") Response.Write("Error Description: " & " #" & Err.Number & " - " & Err.Description & "
") Response.Write("Please contact the systems administrator and quote the above message.
") Response.Write("Message...
") Response.Write("To:" & strTo & "
") Response.Write("CC:" & strCC & "
") Response.Write("Subject:" & strSubject & "
") Response.Write("Message:" & strBody & "
") Response.Write("

To continue with the forum, please click here") Response.End() Else Response.Redirect(MM_editRedirectUrl) End If End If %> <% ' A quick email syntax checker. It's not perfect, ' but it's quick and easy and will catch most of ' the bad addresses than people type in. Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 AND Instr(1, strEmail, ";") = 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %>