Attach file within email

Results 1 to 2 of 2

Thread: Attach file within email

  1. #1
    Tonya in Florida Guest

    Default Attach file within email

    Hi,<BR><BR>I would like to attach a text file in an email [as an attachment.] I have code that works when attaching the file locally to a virtual directory on my pc. However, when I try to acttach the file remotely e.g. using an upload program that takes the file from my pc and uploads to a NT server or even using FTP - I get the following garbage in the body of my email:<BR><BR>begin 666 TestIT.txt<BR>M=&AI&#060;R!I&#060;R!A(&#039 1H:7)D(&#039 1E&#060;W0@=&@96YS=7)E(&%T=&%C:&UE;G1S(&#039!I<BR> :96-E#0II&#060;R!W;W)K:6YG(&IU&#060;W0@&#060;FEG:&#039 0`<BR>`<BR>end<BR><BR>Any help would be greatly appreciated. Thanks.<BR><BR>By the way, here is a copy of my code.<BR>whichname = "/ca/attachments/attach3.txt"<BR>thisFile = server.MapPath(whichname)<BR>dim objMail<BR>set objMail = Server.CreateObject("CDONTS.Newmail")<BR>sHTML = sHTML & "Receipt Date:" & currDt & " " & currTime <BR>objMail.From = ""<BR>objMail.To = ""<BR>objMail.Subject = "Tracking System file retrieval" <BR>objMail.BodyFormat = cdoBodyFormatHTML<BR>objMail.Body = sHTML <BR>objMail.AttachFile thisFile, "TestIT"<BR>objMail.Send<BR>set objMail = Nothing<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Attach file within email

    What&#039s your upload component? most components have documentation which explains how to achieve this (notable SA-FileUp)<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts