|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊!文件1-JMailUploadAutoForm.asp
这是个相似jmail主动发邮件的例子,也能够带附件。能够同时上传多个文件
<html>
<head>
<title>emailform</title>
</head>
<body>
<fontface="verdana,arial"size="2"><b>
<formmethod="post"action="JmailUploadAutoFormProcess.asp"ENCTYPE="multipart/form-data">
Completethisformandclickthesubmit-button.Wewillansweryour
questionsassoonaspossible.
<br><br>
Yourname<br>
<inputtype="text"size="25"name="name"><br>
Youremail<br>
<inputtype="text"size="25"name="email"><br>
Recipientemail<br>
<inputtype="text"size="25"name="recipient"><br>
Stateyourbusiness<br>
<selectname="subject"size="1">
<optionvalue="help">help
<optionvalue="tips">tips
<optionvalue="other">other
</select>
<br>
OS<br>
<inputtype="text"size="25"name="os"><br>
Browser<br>
<inputtype="text"size="25"name="browser"><br>
Enteryourquestion<br>
<textareaname="question"cols="40"rows="15"wrap="PHYSICAL"></textarea>
<br>
<br>
<br>
Attachments<br>
<inputtype="file"name="attachment1">
<br>
<br>
Attachments<br>
<inputtype="file"name="attachment2">
<br>
<br>
Attachments<br>
<inputtype="file"name="attachment3">
<br>
<br>
<inputtype="submit"value="Submit">
</form>
</b></font>
</body>
</html>
文件2-JmailUploadAutoFormProcess.asp
<%
Setupload=Server.CreateObject("w3.Upload")
SetJMail=Server.CreateObject("JMail.SMTPMail")
反省附件并到场邮件
一切其他的form元素被加到邮件里
fori=0toupload.form.count-1
ifupload.form(i).isFilethen
setattachment=upload.Form(i)
JMail.AddCustomAttachmentattachment.filename,attachment.item
else
JMail.appendtext(upload.form(i).name&":"&upload.form(i).item&vbcrlf)
endif
next
失掉form变量,用上传组件
Name=upload.Form("name")
SenderEmail=upload.Form("email")
Subject="Regarding"&upload.Form("subject")
Recipient=upload.Form("recipient")
输出你的SMTP-server
JMail.ServerAddress="mail.duplo.org"
JMail.Sender=Senderemail
JMail.Subject=Subject
JMail.AddRecipientRecipient
JMail.Priority=3
JMail.Execute
%>
<html>
<head>
<title>Dimac</title>
</head>
<body>
<BR>
<BR>
<palign="center"><fontface="Arial,geneva"size="5">
eMailsent</font></p>
<center>
<fontface="Arial,geneva"size="3">
Youremailhasbeensentto<%=Recipient%><br>
<BR>
<BR>
<BR>
</font>
</center>
</body>
</html>
</p>SQLServer是基于服务器端的中型的数据库,可以适合大容量数据的应用,在功能上管理上也要比Access要强得多。在处理海量数据的效率,后台开发的灵活性,可扩展性等方面强大。 |
|