Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CDO Corrupts Attachments
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
CDO Corrupts Attachments
Divers
Thread ID:
00332753
Message ID:
00332753
Vues:
35
Hi Folks,

Can anybody tell me why the following code fragment might result in a corrupted version of the attachment(s) when viewed with Eudora?
local loMessage, loRecipient, loAttachment

loMessage = .oMAPISession.Outbox.Messages.Add()
loRecipient = loMessage.Recipients.Add()
loRecipient.Name = .cRecipientName
loRecipient.Address = "SMTP:" + .cRecipientEMail
loRecipient.AddressEntry.Type = "SMTP"
loRecipient.AddressEntry.Address = .cRecipientEMail
loRecipient.Resolve()
loMessage.Subject = alltrim(.txtSubject.Value)
loMessage.Text = .edtMessage.Value
loAttachment = loMessage.Attachments.Add()
loAttachment.Type = 1		&& attached

* removed the quotes - new version of outlook/CDO doesn't like them
* need to put quotes around the source because it may contain spaces
* putting them around the name does not seem to be required, but we'll do it for completeness
loAttachment.Source = .lstAttachments.list(lnAttachment)
loAttachment.Name = justfname(.lstAttachments.list(lnAttachment))
Sending the same attachments manually from outlook doesn't result in any corruption.

Cheers,

Andrew


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Répondre
Fil
Voir

Click here to load this message in the networking platform