idhtml :Tidtext;
img1 :TIdAttachment;
mailbody ='<html內容>'
IdHTML := TIdText.Create(IdMessage1.MessageParts,mailbody);
IdHTML.ContentType := 'text/html';img1 :=TIdAttachment.Create(IdMessage1.MessageParts,Trim(imgpath));
img1.ExtraHeaders.Values['Content-ID'] := imgID.Strings[i];
img1.ContentType := 'image/jpeg';下面是發送的代碼. 
這樣發送 附件是可以送出來
但是內容就是空的了. 
IdHTML := TIdText.Create(IdMessage1.MessageParts);
IdHTML.ContentType := 'text/html';
這裡改成
idhtml.body.add('html內容');
也不行. 請教為什麽. 急.謝謝