Web Development
4 replies
by peyison
The file to attach has to be on the server. Here's how to send it:
Set oMail = Server.CreateObject("CDONTS.Newmail")
With oMail
.To = "someone@someplace.com"
.From = "me.@here.com"
.Subject = "whatever"
.Attachfile = "C:/Docs/MyFile.DOC", "MyFile.doc"
.Send
End With
There are several ways to get a file to the server, the easiest is to use an ASP component like ASPUpload from Persits (www.persits.com). You can also use the Posting Acceptor from Microsoft - you can do a search for "Posting Acceptor" or "cpshost.dll" at www.microsoft.com for more info. Both of these require having something installed on the server (i.e. not standard ASP). www.asptoday.com has an article on how to do file uploading via only VBScript.
Let me know if you want more info.
Set oMail = Nothing
by peyison
Sorry - Set oMail=Nothing should be under End With
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending