<%@ language= "VBscript" %>
<% Option Explicit
Dim NewMail
Set NewMail = Server.CreateObject("CDONTS.NewMail")
NewMail.To= "
[email protected]"
NewMail.From= "
[email protected]"
NewMail.Subject = "hey sneha"
NewMail.Body = "Hi there, just wanna know wheather you got my new year gift!!"
objMail.AttachFile Server.MapPath("/Pictures/MyPictures.zip") 'FILE IS ATTACHED HERE
NewMail.Bodyformat=0
NewMail.Mailformat=0
NewMail.Send
Set NewMail=Nothing
%>
1. IUSR_MachineName must have the Read permission on the File to be attached
2. Files should exist in the server first. So the client might need to upload it to the server and then only attach. (THink abt the security here)
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com