W3 Upload Component Instance application 3

Source: Internet
Author: User
Tags mail
File 1-jmailuploadautoform.asp

This is a similar jmail automatic email example, you can also bring attachments. Can upload multiple files at the same time

<title>emailform</title>
<body>
<font face= "Verdana, Arial" size= "2" ><b>
<form method= "POST" action= "jmailuploadautoformprocess.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 email<br>
Type= "text" size= "<input" name= "email" ><br>

Recipient Email <br>
<input type= "text" size= "Name=" "Recipient" ><br>

State your Business <br>
<select name= "Subject" size= "1" >
<option value= "Help" >help
<option value= "Tips" >tips
<option value= "Other" >other
</select>
<br>

OS <br>
<input type= "text" size= "a" name= "OS" ><br>

Browser <br>
<input type= "text" size= "name=" "Browser" ><br>

Enter your question <br>
<textarea name= "question" cols= "rows=" wrap= "Physical" ></textarea>
<br>
<br>
<br>

Attachments<br>
<input type= "File" name= "Attachment1" >
<br>
<br>

Attachments<br>
<input type= "File" name= "Attachment2" >
<br>
<br>

Attachments<br>
<input type= "File" name= "Attachment3" >
<br>
<br>
<input type= "Submit" value= "Submit" >
</form>
</b></font>
</body>


File 2-jmailuploadautoformprocess.asp
<%
Set upload = Server.CreateObject ("W3. Upload ")
Set JMail = Server.CreateObject ("Jmail.smtpmail")


' Check attachments and add mail
' All other form elements are added to the email
For i = 0 to Upload.form.count-1
If Upload.form (i). Isfile Then
Set attachment = Upload. Form (i)
Jmail.addcustomattachment Attachment.filename, Attachment.item
Else
Jmail.appendtext (Upload.form (i). Name & ":" & Upload.form (i). Item & vbCrLf)
End If
Next

' Get form variable, use upload component
Name = Upload. Form ("name")
Senderemail = Upload. Form ("email")
Subject = "regarding" & upload. Form ("Subject")
Recipient = Upload. Form ("Recipient")

' Enter your smtp-server.
jmail.serveraddress = "mail.duplo.org"

Jmail.sender = Senderemail
Jmail.subject = Subject

Jmail.addrecipient Recipient

Jmail.priority = 3

Jmail.execute

%>

<title>Dimac</title>

<body>
<BR>
<BR>
<p align= "center" ><font face= "Arial, Geneva" size= "5" >
EMail sent</font></p>
<center>
<font face= "Arial, Geneva" size= "3" >
Your email has been sent to <%= recipient
<BR>
<BR>
<BR>

</font>

</center>
</body>



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.