Actualname = Upload. Form ("name")
Set fileName = Upload. Form ("Thefile")
If Filename.isfile Then
Filename.savetofile (Request.ServerVariables ("Appl_physical_path") & "\" & Actualname)
End If
%>
<title> W3 Upload </title>
<body>
<br>
<br>
<center>
finished!
</center>
<br>
<br>
<br>
</body>
File 1-jmailupload.asp
This example shows how to bring a jmail attachment when a user uploads a file to the server
<title>emailform</title>
<body>
<font face= "Verdana, Arial" size= "2" ><b>
<form method= "POST" action= "jmailuploadprocess.asp" enctype= "Multipart/form-data" >
Complete this form and click the Submit-button. We'll answer your
Questions as soon as possible.
<br><br>
Your name <br>
<input type= "text" size= "a" name= "name" ><br>
Your e-mail <br>
Type= "text" size= "<input" name= "email" ><br></font>
Recipient Name <br>
<input type= "text" size= "Name=" "Recipient" ><br></FONT>
<%
Set upload = Server.CreateObject ("W3. Upload ")
Set JMail = Server.CreateObject ("Jmail.smtpmail") </font >
' Check the attachment and add it to the email
Set attachment = Upload. Form ("Attachment")
If attachment. Isfile Then
Jmail.addcustomattachment Attachment.filename, Attachment.item
End If
' Get form variable, use upload component
Name = Upload. Form ("name")
Senderemail = Upload. Form ("email")
Subject = "regarding" & upload. Form ("Subject")
Recipient = Upload. Form ("Recipient")
BODY = upload. Form ("Body")
' Enter your smtp-server.
jmail.serveraddress = "Xxx.zzz.yyy"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.