Help please!!! What's wrong?

Discussion in 'ASP' started by fheymenguito, Aug 17, 2007.

  1. fheymenguito

    fheymenguito New Member

    Joined:
    Aug 17, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi people,

    This is my first time to post here. I am quite new with ASP. I am just creating a web form with email function. I am encountering error in running the page. Here's my code:
    Code:
    <%@ LANGUAGE="VBSCRIPT" %>
          <HTML>
          <HEAD>
          <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
          <META HTTP-EQUIV="Content-Type" content="text/html;charset=iso-8859-1">
          <TITLE>Fhey Test Page</TITLE>
          </HEAD>
          <BODY>
    
    <%
    
    Dim FirstName
    Dim LastName
    Dim WWID
    Dim OC
    Dim EmploymentType
    Dim ManagerSponsorName
    Dim SameAccessAs
    Dim SameDLas
    Dim RequiredAccounts
    Dim SenderName
    Dim SenderEmail
    Dim ApproverEmail
    Dim ASD
    Dim NewMailObj
    
    FirstName = Request.Form("FirstName")
    LastName = Request.Form("LastName")
    WWID = Request.Form("WWID")
    OC = Request.Form("OC")
    EmploymentType = Request.Form("EmploymentType")
    ManagerSponsorName = Request.Form("ManagerSponsorName")
    SameAccessAs = Request.Form("SameAccessAs")
    SameDLas = Request.Form("SameDLas")
    RequiredAccounts = Request.Form("RequiredAccounts")
    SenderName = Request.Form("SenderName")
    SenderEmail = Request.Form("SenderEmail") 'From field
    ApproverEmail = Request.Form("ApproverEmail") 'To field in manager approval email
    ASD = "asd email here"
    
    Dim bodydetails
    
    bodydetails = "<table border=""0"" cellpadding=""2"" cellspacing=""0"">" & vbCrLf
    bodydetails = bodydetails & "<tr><td colspan=""2"" align=""center""></td><b>ACCOUNT CREATION REQUEST DETAILS</b></td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>First Name:</b></td><td>" & FirstName & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Last Name;</b></td><td>" & LastName & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>WWID:</b></td><td>" & WWID & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Operating Company:</b></td><td>" & OC & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Employment Type:</b></td><td>" & EmploymentType & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Manager/Sponsor:</b></td><td>" & ManagerSponsorName & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Same Access As:</b></td><td>" & SameAccessAs & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Same DL as:</b></td><td>" & SameDLas & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "<tr><td><b>Required Accounts:</b></td><td>" & RequiredAccounts & "</td></tr>" & vbCrLf
    bodydetails = bodydetails & "</table>" & vbCrLf
    
    Dim bodymgr
    		
    bodymgr = "Dear Sponsor/Manager," & vbCrlf
    bodymgr = bodymgr & "Here are the details of the account creation request we received from the user copied in this email. " & vbCrlf
    bodymgr = bodymgr & vbCrlf
    bodymgr = bodymgr & "New user name:" & FirstName + & LastName & vbCrlf
    bodymgr = bodymgr & "Requires same access as:" & SameAccessAs & vbCrlf
    bodymgr = bodymgr & "To be included in the same DL as:" & SameDLas & vbCrlf
    bodymgr = bodymgr & "Required Accounts:" & RequiredAccounts & vbCrlf
    bodymgr = bodymgr & vbCrlf
    bodymgr = bodymgr & "If you find above details correct, kindly have your approval by replying to this email with your digital signature attached." & vbCrlf
    bodymgr = bodymgr & vbCrlf
    bodymgr = bodymgr & "ASD" & vbCrlf
    bodymgr = bodymgr & "Tel no. " & vbCrlf
    
    SendDetails()
    SendApproval()
    
    Function SendDetails()
             Set NewMailObj = CreateObject("CDO.Message")
    			With NewMailObj 
    				.Configuration.Fields.Item _ 
    				("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 
    				.Configuration.Fields.Item _ 
    				("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpserver"
    				.Configuration.Fields.Item _
    				("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
    				.Configuration.Fields.Item _
    				("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
    				.Configuration.Fields.Update 
            		.From = ASD 
            		.To = ApproverEmail
    				.Cc = SenderEmail, ASD
            		.Subject = "Employee/Contractor Access to JJNet - " & FirstName + & LastName
            		.TextBody = bodydetails 
            		.Send 
        		End With 
    
             Set NewMailObj  = Nothing
    End Function
    
    Function SendApproval()
             Set NewMailObj = CreateObject("CDO.Message")
    			With NewMailObj 
    				.Configuration.Fields.Item _ 
    				("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 
    				.Configuration.Fields.Item _ 
    				("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpserver"
    				.Configuration.Fields.Item _
    				("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
    				.Configuration.Fields.Item _
    				("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
    				.Configuration.Fields.Update 
            		.From = SenderName 
            		.To = ASD
            		.Subject = "New User Accounts : "& FirstName + & LastName & "(FOR YOUR APPROVAL)" 
            		.TextBody = bodymgr 
            		.Send 
        		End With 
    
             Set NewMailObj  = Nothing
    End Function
    
    %>
    	  
    <p align="center" class=blurbheadline> <font color="#000066" face="Arial, Helvetica, sans-serif"><strong>User 
      Account Registration</strong></font></p>
    <p align="center" class="copy"><font face="Arial, Helvetica, sans-serif" class="Main_Text">Thank 
      you for your online submission.</font></p>
    <p align="center" class="copy"><font color="#990000" face="Arial, Helvetica, sans-serif" class="Main_Text">Please 
      allow <strong>THREE</strong> working days to process your application. </font></p>
    <p align="center" class="copy"><font face="Arial, Helvetica, sans-serif" class="Main_Text">If 
      you have any feedback do let us know. </font><font face="Arial, Helvetica, sans-serif">Thank 
      You.</font></p>
    <p align="center" class="copy"><font face="Arial, Helvetica, sans-serif">ITIS 
      EUS </font></p>		 
    </BODY>
    </HTML>
    
    I am getting the below error for this page:

    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.

    --------------------------------------------------------------------------------

    Please try the following:

    Open the home page, and then look for links to the information you want.
    Click the Refresh button, or try again later.

    Click Search to look for information on the Internet.
    You can also see a list of related sites.


    HTTP 500 - Internal server error
    Internet Explorer

    Please help. Really can't figure out the source of the error.
    I am sure the server is rightly configures since I have other pages similar to this and located on the same server but are working fine.
    Should be something with the code but can't fiogure out.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You had too many URLs in your post to flagged it as spam and now I have cleared your post and non-spam.

    Also about your problem its not the problem with the code but the problem is with your server setup.
     
  3. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    48
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Please check the IIS error logs, you'll get the error message there!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice