Extra characters at end of attachment (wodSFTP / wodSFTP.NET / wodSFTPdll)
Using wodSMTP COM in VB6, I am getting extra characters appended to my attachments (ASCII comma separated files). Each message has only one attachment.
====== code ==========
Dim MsgPart As SmtpMsg
Dim mFileName As String
mFileName = fso.GetFileName(mgMessage.Attachment)
Set MsgPart = SMTPCom.Message.Attach(mgMessage.Attachment)
MsgPart.Headers.Add Content-Type , multipart/mixed
MsgPart.Headers.Add Content-Disposition , _
attachment; filename= & mFileName &
====== /code ==========
Here's a sample of what is ending up added to the end of my attachment: Jkiç]º /xÍ{wMv
Any ideas about what could be causing the problem?
Thanks!
Re: Extra characters at end of attachment
Hi,
Why don't you try to use CreateSimpleAttachment Method instead using headers.
Here is example:
-----------------------------------------------------
Set smtp1 = New wodSmtpCom
smtp1.CreateSimpleAttachment weonlydo@test.com , drazen@drazen.com , test , this is test , c:\private.txt
'smtp1.Message.Save C:\test.eml
smtp1.SendMessage
-----------------------------------------------------
More help for CreateSimpleAttachment Method you can find here:
http://www.weonlydo.com/Smtp/Help/WODSMTPLib~wodSmtp~CreateSimpleAttachment.html
Hope this helps.
Regards,
Drazen
Re: Extra characters at end of attachment
The problem with that solution is that I need to be able to use the CC and BCC addresses as well. SendSimpleAttachment doesn't support those address types.
Any other ideas?
Thanks!
Re: Extra characters at end of attachment
Okay, maybe I responded too soon. I was looking at SendSimpleAttachment.
If I use CreateSimpleAttachment, can I go back and add the other addresses that I need before I use the SendMessage method?
Re: Extra characters at end of attachment
Hi,
Yes, you will still be able to set CC and BCC addresses by setting CC and BCC Properties.
Regards,
Damba