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>