Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: How to access a file from user.SImilar to attachments in Email


Message #1 by "Ashish Dhar" <ashishdhar@h...> on Sat, 25 Aug 2001 17:26:02
I want to implement something like attachment to an email.

I want user to typein the file name in an input box and then I want to 

attach that file to my message.Any help?
Message #2 by "david kuridza" <david.kuridza@s...> on Sun, 26 Aug 2001 11:31:36 +0200
You can use CDONTS. I guess this is best way.



------------------------------------------------------------------------

----------------------------

	Set objCDOMail = Server.CreateObject("CDONTS.NewMail")



	' this is standard

	objCDOMail.From = "firstname lastname <name@d...>"

	objCDOMail.To = "to@d..."

	objCDOMail.Subject = "subject"

	objCDOMail.Body = "some text here"



	objCDOMail.AttachFile "c:\attach.txt", "attach.txt"



	objCDOMail.Send

	

	Set objCDOMail = Nothing

------------------------------------------------------------------------

----------------------------



Hope this helps.



david...




  Return to Index