When I am sending mail with CDONTS the attachment sent does not have any content? The message goes fine. I used the example from this site and from other sources. Has anyone else had this problem?
can you paste the source so we can find the prob?
<%<BR>Dim newMail<BR> set new_mail = server.CreateObject("CDONTS.NEWMAIL")<BR> new_mail.to = "firstname.lastname@example.org"<BR> new_mail.from = "email@example.com"<BR> new_mail.subject = "My Subject" <BR> new_mail.AttachFile("C:inetpubwwwrootProjectfolder myText.txt")<BR> new_mail.body = "My Body"<BR> new_mail.send<BR>set newMail = nothing<BR>%>
TheAttachment = "C:inetpubwwwrootProjectfoldermyText.txt"<BR>WhatT oNameTheFile = "Attachment.txt"<BR><BR>new_mail.AttachFile TheAttachment,WhatToNameTheFile
It still sends the attachment, but with no content. Could it be a configuration problem.
You need to show me how you are building the attached file.<BR><BR>Sounds like a problem there
new_mail.AttachFile TheAttachment,WhatToNameTheFile,1<BR><BR>This did it as well as setting obj.MailFormat = 0<BR><BR>Tahnks for your help.