here is my code
Withoud attachment it works fine
but, with attachment it gives error like "The system cannot find the file specified."
actually i want to pass parameter input type file as i have done for other paratmters
how can i do so ?
myMail=CreateObject("CDO.Message")
dim txtmsgbody
myMail.Subject= "CV details From "& Request.Form("email0")
myMail.From=Request.Form("email0")
myMail.To="testing@ayyooo.com"
txtmsgbody = "First Name: "& Request.Form("firstName")& "<br/>"
txtmsgbody = txtmsgbody & "Middle Name: "& Request.Form("middleName")& "<br/>"
txtmsgbody = txtmsgbody & "Last Name: "& Request.Form("lastName")& "<br/>"
txtmsgbody = txtmsgbody & "Applying for Position: "& Request.Form("position")& "<br/>"
txtmsgbody = txtmsgbody & "Town:"& Request.Form("town")& "<br/>"
txtmsgbody = txtmsgbody & "City: "& Request.Form("county")& "<br/>"
txtmsgbody = txtmsgbody & "Country: "& Request.Form("Country")& "<br/>"
txtmsgbody = txtmsgbody & "Telephone: "& Request.Form("tel")& "<br/>"
txtmsgbody = txtmsgbody & "Email: "& Request.Form("email0")& "<br/>"
txtmsgbody = txtmsgbody & "Year of Exp.: "& Request.Form("exp")& "<br/>"
txtmsgbody = txtmsgbody & "Comments: "& Request.Form("comments")& "<br/>"
mymail.HTMLBody = txtmsgbody
myMail.AddAttachment(file://c:\Reports.docx)
'myMail.TextBody=Request.Form("Tel") & Request.Form("Mobile") & Request.Form("Subject") & Request.Form("Body")
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")= 2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"'"mail.ayyooo.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic auth
myMail.Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
myMail.Configuration.Fields.item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "pwd"
myMail.Configuration.Fields.Update
myMail.Send
set
myMail=nothing