<%@ Language=VBScript%>
<%
strTitle = "A List of CRF's For Review"
strHeading = "A List of CRF's For Review"
sub sendEmail()
msgbox "hello"
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "CRF's For Review"
objMessage.From = "scheduled_tasks@icec.local"
objMessage.To = "matt.short@nationalexpress.com"
objMessage.TextBody = textfile
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mailserver.icec.local"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
End Sub
%>
<HTML>
<HEAD>
<%response.write ("<TITLE>" & strTitle & "</TITLE>")%>
</HEAD>
<BODY>
<%
response.write ("<H1>" & strHeading & "</H1>")
set FileSysObj=CreateObject("Scripting.FileSystemObject")
strFileAndPath = request.servervariables("SCRIPT_NAME")
strPathOnly = Mid(strFileAndPath,1 ,InStrRev(strFileAndPath, "/"))
strFullPath = server.mappath(strPathOnly)
set fldr=FileSysObj.GetFolder(strFullPath)
response.write("<H2>Folders list</H2>")
set FolderList = fldr.SubFolders
For Each FolderIndex in FolderList
Response.Write("<A HREF='" & FolderIndex.name & "'>" & FolderIndex.name & "</A><BR>")
Next
response.write("<H2>Files list</H2>")
set FileList = fldr.Files
For Each FileIndex in FileList
'This bit excludes this page (and other asp files) from the list of links
if Lcase(right(FileIndex.Name, 4)) <> ".asp" then
Response.Write("<A HREF='" & FileIndex.name & "'>" & FileIndex.name & "</A><BR>")
end if
Next
%>
<form>
<input type="BUTTON" value="say Hello" onclick="sendEmail()">
</form>
</BODY>
</HTML>
|