ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 8th, 2000, 03:24 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Trouble Sending Attachments with CDONTS...

<i><b>Originally posted by : Thomas Kuhn</b></i><br />I'm developing an ASP web site for customer tracking, and wanted to be able to broadcast e-mail all contacts. I developed an HTML page with a form that passes variables to an ASP to send the mail through CDONTS. It works, as long as I don't have an attachment to send with the e-mail. The code I'm using to send the mail is:<br /><br /><%<br />Dim MailObj<br />Set MailObj = Server.CreateObject("CDONTS.NewMail")<br />if len(Request.Form("file1")) > 0 Then<br /> strattachment = Request.Form("File1")<br /> strFileName = strAttachment<br /> do while instr(txtFileName, """) <> 0<br /> strFileName = Mid(strFileName, 2)<br /> loop<br /> MailObj.AttachFile strAttachment, strFileName <br />end if <br />MailObj.From = strFrom<br />MailObj.To = strTo<br />MailObj.Subject = strSubject<br />MailObj.Body = strBody<br />MailObj.Send<br />Set MailObj = Nothing<br />%><br /><br />If there is no attachment (len(Request.Form("file1"))=0) the ASP code works great and sends mail. If I specify an attachment, the code results in the following error message:<br /><br />error '80004005' <br />Unspecified error <br />sendmail.asp, line 109 <br /><br />where line 109 is the "MailObj.AttachFile strAttachment, strFileName" line. I've checked, and the strAttachment and strFileName variables are valid and correct.<br /> Any ideas on what's wrong with this??? TIA.<br /><br />

Reply With Quote
  #2  
Old March 8th, 2000, 05:18 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve</b></i><br />to test it out manually place the correct path to the dir and file to make sure its working before doing it dynamically. that is what i do to test it out...<br /><br /><br /><br />------------<br />Thomas Kuhn at 3/8/2000 1:24:52 PM<br /><br />I'm developing an ASP web site for customer tracking, and wanted to be able to broadcast e-mail all contacts. I developed an HTML page with a form that passes variables to an ASP to send the mail through CDONTS. It works, as long as I don't have an attachment to send with the e-mail. The code I'm using to send the mail is:<br /><br /><%<br />Dim MailObj<br />Set MailObj = Server.CreateObject("CDONTS.NewMail")<br />if len(Request.Form("file1")) > 0 Then<br /> strattachment = Request.Form("File1")<br /> strFileName = strAttachment<br /> do while instr(txtFileName, """) <> 0<br /> strFileName = Mid(strFileName, 2)<br /> loop<br /> MailObj.AttachFile strAttachment, strFileName <br />end if <br />MailObj.From = strFrom<br />MailObj.To = strTo<br />MailObj.Subject = strSubject<br />MailObj.Body = strBody<br />MailObj.Send<br />Set MailObj = Nothing<br />%><br /><br />If there is no attachment (len(Request.Form("file1"))=0) the ASP code works great and sends mail. If I specify an attachment, the code results in the following error message:<br /><br />error '80004005' <br />Unspecified error <br />sendmail.asp, line 109 <br /><br />where line 109 is the "MailObj.AttachFile strAttachment, strFileName" line. I've checked, and the strAttachment and strFileName variables are valid and correct.<br /> Any ideas on what's wrong with this??? TIA.<br /><br />

Reply With Quote
  #3  
Old March 8th, 2000, 05:29 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Thomas Kuhn</b></i><br />Steve,<br /> Been there, done that... I tried removing the variables and hardcoding specific file name in there and still get same response. I do know also that the code generating the filename is working correctly, checked that too.<br /><br /><br />------------<br />steve at 3/8/2000 3:18:23 PM<br /><br />to test it out manually place the correct path to the dir and file to make sure its working before doing it dynamically. that is what i do to test it out...<br /><br /><br /><br />------------<br />Thomas Kuhn at 3/8/2000 1:24:52 PM<br /><br />I'm developing an ASP web site for customer tracking, and wanted to be able to broadcast e-mail all contacts. I developed an HTML page with a form that passes variables to an ASP to send the mail through CDONTS. It works, as long as I don't have an attachment to send with the e-mail. The code I'm using to send the mail is:<br /><br /><%<br />Dim MailObj<br />Set MailObj = Server.CreateObject("CDONTS.NewMail")<br />if len(Request.Form("file1")) > 0 Then<br /> strattachment = Request.Form("File1")<br /> strFileName = strAttachment<br /> do while instr(txtFileName, """) <> 0<br /> strFileName = Mid(strFileName, 2)<br /> loop<br /> MailObj.AttachFile strAttachment, strFileName <br />end if <br />MailObj.From = strFrom<br />MailObj.To = strTo<br />MailObj.Subject = strSubject<br />MailObj.Body = strBody<br />MailObj.Send<br />Set MailObj = Nothing<br />%><br /><br />If there is no attachment (len(Request.Form("file1"))=0) the ASP code works great and sends mail. If I specify an attachment, the code results in the following error message:<br /><br />error '80004005' <br />Unspecified error <br />sendmail.asp, line 109 <br /><br />where line 109 is the "MailObj.AttachFile strAttachment, strFileName" line. I've checked, and the strAttachment and strFileName variables are valid and correct.<br /> Any ideas on what's wrong with this??? TIA.<br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Trouble Sending Attachments with CDONTS...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT