Mengirim email Melalui Ms.Outlook di delphi

const
olMailItem = 0;
var
Outlook: OLEVariant;
MailItem: Variant;
begin
try
Outlook:=GetActiveOleObject('Outlook.Application');
except
Outlook:=CreateOleObject('Outlook.Application');
end;
MailItem := Outlook.CreateItem(olMailItem);
with MailItem do begin
Recipients.Add('delphi.guide@about.com');
Subject := 'Subject: Outlook Mail From Delphi';
Body := 'Welcome to my homepage: http://delphi.about.com';
Attachments.Add('C:\Windows\Win.ini');
Send;
end;
Outlook := Unassigned;
end;

sumber : Tips Explorer 2007

Comments

Popular posts from this blog

Shortest Path Finder dengan Djikstra’s Algorithm

Mengenal dan Menggunakan Komponent MaskEdit pada Delphi

Membuat object Runtime pada Delphi