sending attachments with CDONTS

nicnic
11-29-2001, 10:10 AM
Hi I'm writing an app that sends emails with attachments. When I send the email to an account opened by Outlook the file and attachment work as expected. When I send the same email to my yahoo account the attachment is encoded and imbedded in the email text. Does anyone know what is going on? Is there a fix to this? Since it works in Outlook I don't know if it is just yahoo or a wider problem.

Dim objMail As CDONTS.NewMail
Set objMail = New CDONTS.NewMail
objMail.To = strTo
objMail.Cc = strCc
objMail.Bcc = strBcc
objMail.From = strFrom
objMail.Subject = strSubject
objMail.Body = strBody
objMail.AttachFile strAttachment, cstrAttachName
objMail.AttachFile "D:\Temp\test.txt", "test.txt"
objMail.Send
Set objMail = Nothing

I've also tried it by setting the encoding method to CdoEncodingUUencode and CdoEncodingBase64 but nothing works

Here is what the attachment looks like in they yahoo message (the begin and end stuff is the "attachment")



From: email@email.com | Block Address | Add to Address Book
To: email@email.com
CC: email@email.com
Subject: Multico Rating Systems product notice
Date: Thu, 29 Nov 2001 08:47:31 -0800




Email text


begin 666 test.txt
$=&5S= ``
`
end



Thanks in advance

nicnic
11-29-2001, 01:09 PM
Hi,
If people care, I think this is a yahoo specific problem. I sent the same email to a hotmail account(other web based email app) and it works fine. The attachment is an actual attachment and not an encoded message in the main body. I was mostly worried that CDONTS didn't work for web based systems. If it works for Hotmail, I guess that is good enough.

divil
11-30-2001, 05:31 AM
You could always write your own app to MIME encode emails and send them yourself with winsock to an SMTP server, much more satisfying and not so many dependancies :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum