<%@LANGUAGE="VBSCRIPT"%> <% ' FileName="Connection_ado_conn_string.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="false" ' Catalog="" ' Schema="" Dim MM_IACCDA_STRING 'MM_IACCDA_STRING = "Provider=SQLOLEDB;Initial Catalog=IADA_CC_DB;Data Source=192.168.1.15;Persist Security Info=True;User ID=iaccdadw5929;Password=7sYywwm~lovt" 'MM_IACCDA_STRING = "Provider=SQLOLEDB;Initial Catalog=IADA_CC_DB;Data Source=192.168.1.15;Persist Security Info=True;User ID=iaccdadw5929;Password=7sYywwm~lovt" MM_IACCDA_STRING = Application("MM_IACCDA_STRING") %> <% Function SendMail(strFrom, strTo, strSubject, strBody) Dim objMail Dim intErr Dim SendOK 'On Error Resume Next ' Bad email If chkEmail(strFrom) = 1 Then SendMail = False Exit Function End If ' Bad email If chkEmail(strTo) = 1 Then SendMail = False Exit Function End If '--- Create an instance of the ASPMail SMTP objMail object. 'Set objMail = Server.CreateObject("SMTPsvg.Mailer") 'objMail.FromName = "iada-cc.com" 'objMail.FromAddress = strFrom 'objMail.RemoteHost = "mail.iada-cc.com" 'objMail.AddRecipient strTo, strTo 'objMail.ContentType = "text/html" 'objMail.Subject = strSubject 'objMail.BodyText = strBody Set objMail = Server.CreateObject("Persits.MailSender") objMail.FromName = strFrom objMail.From = strFrom objMail.AddReplyTo strFrom objMail.Host = "mail.iada-cc.com" objMail.Username = "webmail@iada-cc.com" objMail.Password = "zu@ie6jseKI" objMail.AddAddress strTo objMail.Subject = strSubject objMail.Body = strBody objMail.IsHTML = True 'on error resume next '## Ignore Errors objMail.SendToQueue 'If Err <> 0 Then ' SendMail = False ' 'Err_Msg = Err_Msg & "
  • Your request was not sent due to the following error: " & Err.Description & "
  • " 'Else SendMail = True 'End if 'Response.Write objMail.FromName & "
    " 'Response.Write objMail.FromAddress & "
    " 'Response.Write objMail.RemoteHost & "
    " 'Response.Write strTo & "
    " 'on error resume next '## Ignore Errors 'SendOk = objMail.SendMail 'Response.Write CInt(SendOk) & "
    " 'If not(SendOk) <> 0 Then ' SendMail = objMail.Response 'Else ' SendMail = True 'End if 'Set objMail = Server.CreateObject("SoftArtisans.SMTPMail") '--- Set the Remote SMTP Host through which to send the email. 'objMail.RemoteHost = "localhost" 'objMail.FromAddress = strFrom 'objMail.AddRecipient "" , strTo 'objMail.Subject = strSubject 'objMail.HtmlText = strBody 'If objMail.SendMail Then ' SendMail = True 'Else ' SendMail = objMail.response 'End if 'response.write "SMTP Response " & CInt(SendOK) & "
    " 'Set objMail = CreateObject("CDONTS.NewMail") 'objMail.From = strFrom 'objMail.To = strTo 'objMail.Subject = strSubject 'objMail.BodyFormat = 0 'objMail.MailFormat = 0 'objMail.Body = strBody 'objMail.Send 'If Err.Number = 0 Then ' SendMail = True 'Else ' SendMail = False 'End If Set objMail = Nothing End Function 'Check for valid email function chkEmail(strAddress) ' checks for a vaild email ' returns 1 for invalid addresses ' returns 0 for valid addresses dim atCnt chkEmail = 0 ' chk length if len(strAddress) < 5 then ' a@b.c should be the shortest an ' address could be chkEmail = 1 ' chk format ' has at least one "@" elseif instr(strAddress,"@") = 0 then chkEmail = 1 ' has at least one "." elseif instr(strAddress,".") = 0 then chkEmail = 1 ' has no more than 3 chars after last "." elseif len(strAddress) - instrrev(strAddress,".") > 3 then chkEmail = 1 ' has no "_" after the "@" elseif instr(strAddress,"_") <> 0 and _ instrrev(strAddress,"_") > instrrev(strAddress,"@") then chkEmail = 1 else ' has only one "@" atCnt = 0 for i = 1 to len(strAddress) if mid(strAddress,i,1) = "@" then atCnt = atCnt + 1 end if next if atCnt > 1 then chkEmail = 1 end if ' chk each char for validity for i = 1 to len(strAddress) if not isnumeric(mid(strAddress,i,1)) and _ (lcase(mid(strAddress,i,1)) < "a" or _ lcase(mid(strAddress,i,1)) > "z") and _ mid(strAddress,i,1) <> "_" and _ mid(strAddress,i,1) <> "." and _ mid(strAddress,i,1) <> "@" and _ mid(strAddress,i,1) <> "-" then chkEmail = 1 end if next end if end function Sub SendAccountApproved(ID) Dim Email, Username, Password, FirstName, LastName, Approved If Not GetMemberEmailInfo(ID, Email, Username, Password, FirstName, LastName, MemberType, Approved) Then 'Response.Write "Member Not Found" Exit Sub End If 'Response.Write Email & " " & Username & " " & Password & " " & FirstName & " " & MemberType & " " & Approved strFrom = Application("RegisterMailTo") strTo = Email If Approved Then strSubject = "IADA-CC " & MemberType & " Membership Accepted" strBody = "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "IADA-CC Membership Information" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "Your Membership has been accepted and your Member login has been activated

    Here is your IADA-CC Membership Information

    " & vbCrLf _ & "Your Login Username: " & Username & "
    " & vbCrLf _ & "Your Login Password: " & Password & vbCrLf _ & "

    Member Login" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf Else strSubject = "IADA-CC " & MemberType & " Membership Status" strBody = "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "IADA-CC Membership Information" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "Your Membership is currently pending approval

    Here is your IADA-CC Membership Information

    " & vbCrLf _ & "Your Login Username: " & Username & "
    " & vbCrLf _ & "Your Login Password: " & Password & vbCrLf _ & "

    www.iada-cc.com" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf End If SendMail strFrom, strTo, strSubject, strBody 'Response.Write strFrom & " " & strTo End Sub Function EmailMembers(EmailFrom,EmailSubject,EmailMsg,MemberType,Approved) Dim rsMem Dim SQL Dim strBody, strTo Dim i SQL = "SELECT Email, UserName, Password, FirstName, LastName, Company FROM Member WHERE MemberType IN(" & MemberType & ") AND " & Approved Set rsMem = Server.CreateObject("ADODB.Recordset") rsMem.ActiveConnection = Application("MM_IACCDA_STRING") rsMem.Source = SQL rsMem.CursorType = 0 rsMem.CursorLocation = 2 rsMem.LockType = 1 rsMem.Open() i = 0 While Not rsMem.EOF ' Send Email strBody = "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "IADA-CC Membership Information" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & EmailMsg & vbCrLf _ & "

    Your Account
    Username: " & rsMem("UserName") & "
    Password: " & rsMem("Password") & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf i = i + 1 strTo = rsMem("Email") SendMail EmailFrom, strTo, EmailSubject, strBody rsMem.MoveNext Wend rsMem.Close Set rsMem = Nothing EmailMembers = i End Function Function GetMemberEmailInfo(ID, Email, Username, Password, FirstName, LastName, MemberType, Approved) Dim rsMem Dim MemFound Set rsMem = Server.CreateObject("ADODB.Recordset") MemFound = False rsMem.ActiveConnection = Application("MM_IACCDA_STRING") rsMem.Source = "SELECT Email, Username, Password, FirstName, LastName, MemberType, Approved FROM Member WHERE MemberID=" & ID rsMem.CursorType = 0 rsMem.CursorLocation = 2 rsMem.LockType = 1 rsMem.Open() If Not rsMem.EOF Or Not rsMem.BOF Then Email = rsMem("Email") Username = rsMem("Username") Password = rsMem("Password") FirstName = rsMem("FirstName") LastName = rsMem("LastName") MemberType = rsMem("MemberType") Approved = rsMem("Approved") MemFound = True End If GetMemberEmailInfo = MemFound rsMem.Close Set rsMem = Nothing End Function %> <% Dim Member__MMColParam Member__MMColParam = "1=1" If (Request.Form("Email") <> "") Then Member__MMColParam = Request.Form("Email") End If %> <% Dim Member Dim Member_numRows Set Member = Server.CreateObject("ADODB.Recordset") Member.ActiveConnection = Application("MM_IACCDA_STRING") Member.Source = "SELECT Username, Password, Email FROM dbo.Member WHERE Email = '" + Replace(Member__MMColParam, "'", "''") + "'" Member.CursorType = 0 Member.CursorLocation = 2 Member.LockType = 1 Member.Open() Member_numRows = 0 %> <% Dim SendResults If Not Member.EOF Or Not Member.BOF Then strFrom = Application("RegisterMailTo") strTo = Request.Form("Email") strSubject = "IADA-CC " & Request.Form("MemberType") & " Membership" strBody = "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "IADA-CC Membership Information" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf _ & "Here is your IADA-CC Membership Information

    " & vbCrLf _ & "Your Login Username: " & (Member.Fields.Item("Username").Value) & "
    " & vbCrLf _ & "Your Login Password: " & (Member.Fields.Item("Password").Value) & vbCrLf _ & "" & vbCrLf _ & "" & vbCrLf SendResults = SendMail(strFrom, strTo, strSubject, strBody) End IF %> :: Member Login ::
    [an error occurred while processing this directive]
      Noteworthy News
      Collectors Corner
      "" Then %>javascript:openChat('Chat/Login.asp','Chat');<% Else %>#<% End If %>" class="navleftlink">Live Chat
      Office of Ethics

    <% Response.Write(Ad.GetAdvertisement("adside.txt")) %>

    <% If Not Member.EOF Or Not Member.BOF Then %> <% Else %> <% End If %>
    IADA-CC Member Login
    <% If SendResults Then %> We have sent your login info to
    <%=(Member.Fields.Item("Email").Value)%> <% Else %> We are unable to send your login info to
    <%=(Member.Fields.Item("Email").Value)%>
    due to send error <%= SendResults %> <% End If %>
    Email:


    [an error occurred while processing this directive]

    <% Member.Close() Set Member = Nothing %>