if (mainform.AddFile_Grid_2.rowcount >= 2) and (mainform.AddFile_Grid_2.cells[0,1] <> '') then
begin
for i:=0 to mainform.AddFile_Grid_2.rowcount-1 do
begin
TIdAttachment.Create(IdMessage1.MessageParts,(mainform.AddFile_Grid_2.cells[0,i+1]));
end;
end;
위와같이하면 'can't not open c:autoexec.bat' 란에러가나고
TIdAttachment.Create(IdMessage1.MessageParts,'c:autoexec.bat');
TIdAttachment.Create(IdMessage1.MessageParts,'c:config.sys');
과같이하면 이상업이 보내집니다.
첨부파일은 똑같습니다.