Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : MessageParts.Count always 0 (zero)
| Subject: | MessageParts.Count always 0 (zero) |
| Posted by: | "Cornie" (cornie..@gmail.com) |
| Date: | Tue, 1 Aug 2006 22:07:10 |
Please Help
I have two apps. One send a MIME encoded mail, with one or more files
attached. The other app then downloads the mail and the attachments. I
use GMail and everything work fine until 5 days ago. Now the
"receiving" app does not see the attachments to the message. The
MessageParts.Count is always zero! When I view the message in Gmail or
Thunderbird it is 100% and I can save the attached files, so I believe
the problem lies with the receiving app. I have tried almost everything,
changing the Encoding type, used no Decode, no Encode, etc but
MessageParts.Count stays 0. The code is:
MsgCount := POP.CheckMessages;
for intIndex := 1 to MsgCount do begin
try
If (POP.Retrieve(intIndex, Msg)) then begin
for Index2 := 0 to Pred(Msg.MessageParts.Count) do begin
TIdAttachmentMemory(Msg.MessageParts.Items[Index2]).
SaveToFile(ExtractFilePath(Application.exename)+'\'+
TIdAttachmentFile(Msg.MessageParts.Items[Index2]).Filename);
end;
finally
end;
(I have removed all the error checking/handling code).
Msg = TIdMessage
AttachmentCoding = "MIME"
EnCoding = "meMIME"
rest as default.
Delphi 2006
Indy10
Regards
Cornie van Schoor