下面是我的代码。我需要发送files.name[i]
电子邮件的内容。请告诉我该怎么做?给我一个提示,我会努力的。
<meta http-equiv="refresh" content="300">
<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}
</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\\squeaker\SiSystemsFile\WebServices\WebSites\Perforce\Bhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>
<!--- <cfset min_change= Minute(Now())>
<cfset bin=min_change %5>
<cfif bin eq 0>
<cfinclude template="project_file_dir.cfm">
</cfif> --->
<cfloop index = "i" from = "1" to = #f#>
<cfoutput>
#files.name[i]# <br>
</cfoutput>
</cfloop>
</form>
<cfmail to="Gayathri.p@sisystems.com"
from="bhargavi.kumar@sisystems.com"
subject="Testing the E-Mail"
type="text">
Dear Gayathri
I just send this mail for testing . Please Ignore this
Regards
Bhargavi
</cfmail>
<cfoutput>
<p>Thank you for registering.
We have just sent you an email.</p>
</cfoutput>
<!--- <cffile action="write"
addnewline="yes"
file="\\squeaker\SiSystemsFile\WebServices\WebSites\Perforce\Bhargavi\report.txt"
output="#f# "
fixnewline="yes"> --->
<!--- <cfloop index = "i" from = "1" to = #f#>
<cfoutput>
<cffile action="write"
addnewline="yes"
file="\\squeaker\SiSystemsFile\WebServices\WebSites\Perforce\Bhargavi\report.txt"
output="#files.name[i]#"
fixnewline="yes">
</cfoutput>
</cfloop> --->
</body>
</html>
我还必须每 5 分钟刷新一次页面,但我已经这样做了。我需要files.name
在电子邮件中发送。