Question Problem : i receive .dat files in an e-mail with embedded images. How come ?

ptiso

New member
Joined
Nov 25, 2009
Messages
4
Programming Experience
1-3
Hi, this is my first time here so i hope i can find some help ^^
My problem is that i'm working on a project and i have to send embedded images in an email. Here is an example of my code :

Dim FicImage As New LinkedResource(chemin)
Dim cle As String = Key.Substring(4, Key.Length() - 4)
FicImage.ContentId = cle
FicImage.TransferEncoding = TransferEncoding.Base64

htmlView.LinkedResources.Add(FicImage)

mail.AlternateViews.Add(htmlView)

But when i receive the mail, there are .dat files in attachments and i really don't understand how i can solve this. Anyone has an idea ?
 
Thanks for your reply.
I already tried this before and i've had the same results.
I manage to sen my e-mail with embedded images but for a reason i don't know, there are also attachments with extension .dat and i don't know what i can do to hide them ( i also tried with attachment inline and didn't work ...) :(
 
i just understand what the problem is.
I sometimes have 2 or 3 times the same image in my e-mail and i tried to create a linkedressource for each.
That's the reason why i have .dat files in attachment.
Now i'm looking for linking differents cid at one only linkedressource.
 
You can have multiple img tags pointing to the same cid.
 
Back
Top