Attach med Jmail
Jeg har følgende script på min side, hvor besøgende kan sende en mail direkte til mig med jmail.Hvad mangler jeg her hvis jeg gerne vil have at de skal kunne vedhæfte filer ?
----------------------------------------------------------
<form method="POST" action="sendmail.asp">
<p>Name<br>
<input type="text" name="Name" size="20" style="border-style: solid; border-width: 1; background-color: #DFEFFF"></p>
<p>Nick<br>
<input type="text" name="Nick" size="20" style="border-style: solid; border-width: 1; background-color: #DFEFFF"></p>
<p>Email<br>
<input type="text" name="Email" size="20" style="border-style: solid; border-width: 1; background-color: #DFEFFF"></p>
<p>Web<br>
<input type="text" name="Web" size="20" style="border-style: solid; border-width: 1; background-color: #DFEFFF" value="http://"></p>
<p>Comment<br>
<textarea rows="5" name="Comment" cols="55" style="border-style: solid; border-width: 1; background-color: #DFEFFF"></textarea></p>
<p align="center">
<input type="submit" value="Submit" name="Submit" style="border-style: solid; border-width: 1; background-color: #DFEFFF">
<input type="reset" value="Reset" name="Reset" style="border-style: solid; border-width: 1; background-color: #DFEFFF"></p>
</form>
----------------------------------------------------------
<%
Navn = Request.Form("Name")
Nick = Request.Form("Nick")
email = Request.Form("email")
Web = Request.Form("Web")
Besked = Request.Form("Comment")
ip = Request.ServerVariables("REMOTE_ADDR")
SenderEmail = "test@mail.org"
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.mail.org"
JMail.AddRecipient "test@mail.org"
JMail.Sender = SenderEmail
JMail.Subject = "E-mail fra Test"
body = "Navn: " & vbcrlf & Navn & vbcrlf & vbcrlf & "Nick: " & vbcrlf & Nick & vbcrlf & vbcrlf & "E-mail: " & vbcrlf & email & vbcrlf & vbcrlf & "Web: " & vbcrlf & Web & vbcrlf & vbcrlf & "IP: " & vbcrlf & ip & vbcrlf & vbcrlf & "Besked:" & vbcrlf & Besked
JMail.Body = Body
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
' Her angiver du den side der skal omstilles til når mailen er sendt.
Response.Redirect "done.asp"
%>