title: ASP send email form with attachment
body: <p>I have an HTML form that sends an email on submit with this code. How do I go about sending an uploaded file as an attachment as well. I am new to asp and have looked at many examples but they are all very different and complex. Many thanks in advance.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form method="post" action="index.asp"&gt;
      &lt;input type="text" name="name" id="name"&gt;
      &lt;input type="file" name="myFile1" id="myFile1"&gt;
      &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>ASP</p>
  
  <pre><code>&lt;%
  Set myMail=CreateObject("CDO.Message")
  myMail.Subject="Sending email with CDO"
  myMail.From="mymail@mydomain.com"
  myMail.To="someone@somedomain.com"
  myMail.TextBody="This is a message."
  myMail.AddAttachment "c:\mydocuments\test.txt"
  myMail.Send
  set myMail=nothing
  %&gt;
  </code></pre>
  
  <p>So I got the above code to send an attachment, but I still have no idea how to go about attaching an uploaded file from my form? Any help would be greatly appreciated.</p>