⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mail.asp

📁 基于C#语言的一个物流信息网数据库系统开发案例的源代码 ,很实用
💻 ASP
字号:
<!-- #include file="../Conn/conn.asp" -->
<%
mails("求职")
sub mails(style1)
if style1="求职" then style2="招聘" end if 
if style1="招聘" then style2="求职" end if 
if style1="供应信息" then style2="需求信息" end if 
if style1="需求信息" then style2="供应信息" end if 
sql="select * from tb_Meg where Style='"&style1&"'"
rs.open sql,conn,1,3
numbers=rs.RecordCount
redim ary(numbers)
i=0
while not rs.eof 
	ary(i)=rs("UserName")
	rs.movenext
wend	
set rs=nothing
conn.close
set conn=nothing
%>
<%response.Write(numbers)%>
<% for j=0 to numbers%>
<!-- #include file="../Conn/conn.asp" -->
<%
	sql="select * from tb_Account where Name='"&ary(j)&"'"
	rs.open sql,conn,1,1
	if not rs.eof then 
		types=rs("Style")
		response.Write(types)
		set rs=nothing
		conn.close
		set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
		if types="Personal" then 
			sql="select * from tb_Personal where Name='"&ary(j)&"'"
			rs.open sql,conn,1,1
			if not rs.eof then 
				mail=rs("Email")
			end if 
			title="来自明日物流供求信息网的信息!"
			response.Write(title)
			set rs=nothing
			conn.close
			set conn=nothing
%>
<!-- #include file="../Conn/conn.asp" -->
<%
      		whichfile=server.mappath("../Date/Date")
      		Set fs=CreateObject("Scripting.FileSystemObject")
      		Set thisfile=fs.opentextfile(whichfile)
      		visitors=cdate(thisfile.readline)
      		thisfile.close
      		countlen=len(visitors)
      		set out=fs.createtextfile(whichfile)
      		out.writeline(date())
      		out.close
     		set fs=nothing
			sql="select * from tb_Meg where Style='"&style2&"' and IssueDate between '"&visitors&"' and '"&Date()&"'"

			rs.open sql,conn,1,1
			while not rs.eof 
				content=rs("Content")
				On Error Resume Next
				Set objs = server.CreateObject("MSMAPI.MAPISession")
				Set objm = server.CreateObject("MSMAPI.MAPIMessages")
				objs.SignOn   '建立一个邮件会话
				objm.MsgIndex=-1
				objm.RecipDisplayName="wgh717@sohu.com"  '收件人地址
				objm.MsgSubject=title    '主题信息
				objm.MsgNoteText=content  '内容
				objm.SessionID=objs.sessionID
				objm.Send
				If Err.Number>0 Then
					Response.Write(err.Description) '输出错误信息
					Response.End()
				End If
				objs.SignOff
				rs.movenext
			wend 
						response.write(sql)
		end if
	end if 
 next 
 end sub
 %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -