help!! Attachment not working correctly
I am opening a file to read in an attachment. This is what the attachment
should look like
<TO>
"email addr"
"email addr"
</TO>
<SUBJECT>
test
</SUBJECT>
<BODY>
msg
</BODY>
<TO>
"email addr"
"email addr"
</TO>
<SUBJECT>
<TO>
"email addr"
"email addr"
</TO>
<SUBJECT>
test
</SUBJECT>
<BODY>
msg
</BODY>
here is the code that should be reading it in. I have done things like this
prior to v9 with little or no problem. Is there a mistake in the code or a
bug in IDMessageParts?
********** section of code **********
procedure TWM.SendMail(bodyLst, attchLst : TStringList);
var
i : integer;
vAttch : array[0..9] of TIDAttachment;
begin
// setting up
if AttchLst <> nil then
for i := 0 to AttchLst.Count -1 do
begin
vAttch[i] := TIdAttachment.Create(IDMsg.MessageParts, AttchLst[i]);
vAttch[i].FileIsTempFile := True;
end;
//send email
if AttchLst <> nil then
for i := 0 to AttchLst.Count -1 do
begin
vAttch[i].Free;
It runs without any errors except the results are wrong.
Dixon Epperson