Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   Help please!!! What's wrong? (http://www.go4expert.com/forums/help-whats-wrong-t5904/)

fheymenguito 17Aug2007 13:18

Help please!!! What's wrong?
 
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.

shabbir 17Aug2007 14:42

Re: Help please!!! What's wrong?
 
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.

pradeep 18Aug2007 13:24

Re: Help please!!! What's wrong?
 
Please check the IIS error logs, you'll get the error message there!


All times are GMT +5.5. The time now is 08:08.