procedure TForm1.Button1Click(Sender: TObject);
const
olMailItem = 0;
var
Outlook: OleVariant;
vMailItem: variant;
begin
try
Outlook := GetActiveOleObject('Outlook.Application');
except
Outlook := CreateOleObject('Outlook.Application');
end;
vMailItem := Outlook.CreateItem(olMailItem);
vMailItem.Recipients.Add('ran@ykse.com.cn');
vMailItem.Subject := 'test email';
vMailItem.Body := 'This is a test';
vMailItem.Attachments.Add('c:/ab.txt');
vMailItem.Send;
VarClear(Outlook);
end;