writing to a remote machine or sending an attachme

Results 1 to 2 of 2

Thread: writing to a remote machine or sending an attachme

  1. #1
    Join Date
    Dec 1969

    Default writing to a remote machine or sending an attachme

    Hi <BR>In my prog i create a report and store the output in two text files using filesystemobject however the files are created on the server this does not serve my purpose as i want a file to be created on any machine from which the asp page is viewed ,i know this isnt possible is there a workaround,so that the user who views the page takes the report printout ? a cookie wont help as the file is pre formatted,<BR> I have thought of auto mailing these files to a couple of predefined users as a workaround however im not aware of this procedure and also how to send these two text files as attachment in the mail

  2. #2
    Join Date
    Dec 1969

    Default RE: writing to a remote machine or sending an atta

    CDONTS is pretty easy to use provided your IIS server is configured properly. Here&#039;s a function I wrote a while ago that&#039;ll send an email out from ASP on an IIS server using CDONTS. You should be able to modify it to include attachments w/out much difficulty. Check out O&#039;Reilly&#039;s ASP in a Nutshell, it&#039;s a good reference book. Unfortunately I&#039;m working on a JSP project right now so I don&#039;t have any of my ASP stuff handy. (But then again I don&#039;t want to do all the work for you! :)<BR><BR>If you can save the report as a single file you could also put a Meta tag in the HTML that will automatically download the file when the user is viewing the report.<BR><BR><BR>Function sendmessage( mailto, mailsubject, mailmessage )<BR> Dim NewMail<BR> Set NewMail = Server.CreateObject("CDONTS.NewMail")<BR> NewMail.From = "someone@domain.com" &#060;-Change this!<BR> NewMail.To = mailto<BR> NewMail.Subject = mailsubject<BR> NewMail.Body = mailmessage<BR> NewMail.bodyformat = 1<BR><BR> x = NewMail.Send<BR> Set NewMail = Nothing<BR>End Function<BR><BR>HTH,<BR>-Jeff

Posting Permissions

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