</body> ------------------------------ mit problem er, at når jeg forsøger at få vedhæftet en fil, så kommer kun stien til filen med emailen. hvad gør jeg forkert?
<!-- This example uses the Persits Software AspEmail component to send SMTP email with an optional file attachment.-->
<HTML> <BODY BGCOLOR=\"#FFFFFF\">
<% \' Capture an uploaded file Set Upload = Server.CreateObject(\"Persits.Upload\") Upload.IgnoreNoPost = True \' suppress \"Nothing has been posted\" error Count = Upload.Save(\"c:\\upload\")
\' Send mail If Upload.Form(\"Send\") <> \"\" Then Set Mail = Server.CreateObject(\"Persits.MailSender\") Mail.Host = \"mail.atlantech.net\" \' replace that with your own host Mail.From = Upload.Form(\"From\") Mail.AddAddress Upload.Form(\"To\") Mail.Subject = Upload.Form(\"Subject\") Mail.Body = Upload.Form(\"Body\")
If Count > 0 Then Mail.AddAttachment Upload.Files(1).Path
On Error Resume Next Mail.Send If Err <> 0 Then Response.Write \"Error occurred when trying to send mail: <B>\" & Err.Description & \"</B>\" Else Response.Write \"Success! Message was sent.\" End If End If %>
<h2>Sending Mail with an Attachment using AspEmail</h2>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.