Empty attachment

Nov 5, 2010 at 12:38 PM
Edited Nov 5, 2010 at 2:47 PM

Hello, first off my compliments for this fantastic program!

I'm experiencing a little problem... I receive via POP3client emails with attachments that are usually two HTML files. (So like: file1.html, file2,html).

Then I have to redirect this email to a list of people I have. the problem is that the final mail have two empty attachments (0 Kb) !

 

When I retrieve the message then I initialize a SmtpMessage = myPopMessage.CreateSmtpMessage.

I also tried to use the GetAttachedContent and put one by one the attachments into mySmtpMessage through the CreateSmtpContent method but nothing, I always obtain an empty message...

Is there any clue?

Thank you very much !

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Ok, bynow I solved this way ... (VB code)

                    Dim pContent As Pop3.Pop3Content
                    Dim sContent As New Smtp.SmtpContent
                    For Each pContent In Pop3.Pop3Message.GetAttachedContents(pmMessage)
                        pContent.DecodeData(My.Computer.FileSystem.CurrentDirectory & "\" & pContent.FileName)
                        sContent = New Smtp.SmtpContent
                        sContent.FileName = My.Computer.FileSystem.CurrentDirectory & "\" & pContent.FileName
                        sContent.LoadData(My.Computer.FileSystem.CurrentDirectory & "\" & pContent.FileName)
                        spMessage.Contents.Add(sContent)
                        Dim fi As New FileInfo(My.Computer.FileSystem.CurrentDirectory & "\" & pContent.FileName)
                        fi.Delete()
                    Next

But I'd really like to know why the CreateSmtpMessage doesn't work properly (or maybe I just can't get it to work ;) )

Thanks again!

 

Coordinator
Nov 8, 2010 at 3:02 PM

OK,I'll investigate your problem.
Please give me a text data by callig GetDataText method after all file added to SmtpMessage object.

regard.