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 with CDONTS attachment

Status
Not open for further replies.

tondarb

Programmer
Oct 8, 2003
37
US
Hi

I am using CDONTS in my application for sending emails and also for sendding a acrobat pdf file as an attachment.I see that in some case the attachment is going fine but in some other cases I see that the attachment is not viewed as an attachement .Instead I see some strange characters (i think internal format of the pdf file ) send as a email (not as an attachment).Any help on this will be highly appreciated


Thanks
Regards
TRB
 
Hi DeCjute

This is the code used
the Above URL is not accessible .

Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "trb@test.co.za"
MyCDONTSMail.To= "anand_anand10@yahoo.com
MyCDONTSMail.AttachFile StrPDFPath
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send


StrPDFPath is the Physical Path of the File
e.g C:\test.pdf which is on the webserver
 
both links work and here their sample code:

<%
Option Explicit

Dim objMail
Set objMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)

objMail.From = &quot;friend@somewhere.com&quot;
objMail.Subject = &quot;A message TO you&quot;
objMail.AttachFile(&quot;d:\images\pic.gif&quot;)
objMail.To = &quot;someone@someplace.com&quot;
objMail.Body = &quot;This is the body of the Message&quot;
objMail.Send

Response.write(&quot;Mail was Sent&quot;)

'You must always do this with CDONTS.
set objMail = nothing
%>
 
Yes I have set the object to nothing .

Please try to send a pdf file to yahoo and see what happens.Then you can understand what exactly I am saying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top