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>
Title <br>
<select name= "Subject" size= "1" >
<option value= "Help" >help
<option value= "Tips" >tips
<option value= "Other" >other
</select>
<br>
Content <br>
<textarea name= "Body" cols= "rows=" wrap= "Physical" ></textarea>
<br>
Accessories <br>
<input type= "file" name= "attachment" >
<br>
<br>
<input type= "Submit" value= "Submit" >
</form>
</b></font>
</body>
File 2-jmailuploadprocess.asp
<%
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"
Jmail.sender = Senderemail
Jmail.subject = Subject
Jmail.addrecipient Recipient
Jmail.body = Body
Jmail.priority = 3
Jmail.execute
%>
<title>Dimac</title>
<body>
<br>
<br>
<p align= "center" ><font face= "Arial, Geneva" size= "5" >
Mail Send </font></p>
<center>
<font face= "Arial, Geneva" size= "3" >
Your email was sent to <%= recipient%> <br>
<br>
<br>
<br>
</font>
</center>
</body>