Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in CDONTS

Status
Not open for further replies.

murugesanks

Programmer
Jan 25, 2001
48
US
Hi,
I am tring to send mail with attachment using CDONTS.NewMail object.
this is code,

Set objMyMail = CreateObject("CDONTS.NewMail")
objMyMail.To = Request.Form("mailto")
objMyMail.From = Request.Form("mailfrom")
objMyMail.Subject = Request.Form("mailsubject")
objMyMail.Body = Request.Form("mailbody")
objMyMail.AttachFile(Request.Form("mailattachment"))
objMyMail.Send
Set objMyMail = Nothing

i am getting the following error
----------------------------------------------------------
HTTP 500 - Internal server error
Internet Explorer
----------------------------------------------------------


if i comment the following line,
----------------------------------------------------------
objMyMail.AttachFile(Request.Form("mailattachment"))
----------------------------------------------------------

its working perfectly. can anyone tell me, whats the problem and solution for this.

thanks in advance

Murugesan.
 
Hi

There seems to be some path problem in that objMyMail.AttachFile(Request.Form("mailattachment")) statement. Please check the file path if its rsiding on ther server and give the actual path.

:) *** ASP/VB/SQL Programmer (Free Lancing work accepted) *** B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top