{ Outlook E-Mail Sender! -- by Jimmy Tharpe *
- Copyright ?2000 by Used-Disks, Inc. *
- http://www.used-disks.com/ *
-------------------------------------------------------------------------------*
--- LEGAL ISSUES --------------------------------------------------------------*
* Copyright ?2000 by Used-Disks, Inc. *
* <jimmy@used-disks.com> *
* This software is provided 'as-is', without any express or implied *
* warranty. In no event will the author be held liable for any damages *
* arising from the use of this software. *
* *
* Permission is granted to anyone to use this software for any purpose, *
* including commercial applications, and to alter it and redistribute it *
* freely, subject to the following restrictions: *
* *
* 1. The origin of this software must not be misrepresented, you must *
* not claim that you wrote the original software. If you use this *
* software in a product, an acknowledgment in the product *
* documentation would be appreciated but is not required. *
* *
* 2. Altered source versions must be plainly marked as such, and must *
* not be misrepresented as being the original software. *
* *
* 3. This notice may not be removed or altered from any source *
* distribution. *
* *
* 4. You must register this software by sending a picture postcard to *
* the author. Use a nice stamp and mention your name, street address, *
* EMail address and any comment you like to say. *
* *
* Send Registration Cards to: *
* Jimmy Tharpe - Used-Disks, Inc. *
* 2546 Stonington Road *
* Dunwoody, Ga. 30338 *
*------------------------------------------------------------------------------*
Comments: *
For this demo to work, you must have Microsoft Outlook Installed. *
*------------------------------------------------------------------------------}
unit formOutlook;
procedure AddRecipient(MI : olevariant; Recipiant : string);
begin
MI.Recipients.Add(Recipiant);
end;
procedure AddAttachments (MI : olevariant; Attachments : TStrings);
var
i : integer;
begin
for i := 0 to (Attachments.Count - 1) do
begin
if FileExists (Attachments[i]) then
MI.Attachments.Add (Attachments[i])
else
MessageDlg('File ' + Attachments[i] + '" not found.', mtError, [mbOK], 0);
end;
end;
procedure TForm1.btnAddAttachmentClick(Sender: TObject);
begin
with OpenDialog do
if Execute then
lbxAttachments.Items.Add(FileName);
end;
procedure TForm1.btnRemoveAttachmentClick(Sender: TObject);
var
i : Integer;
begin
for i := 0 to lbxAttachments.Items.Count -1 do // Iterate
begin
if lbxAttachments.Selected[i] then
lbxAttachments.Items.Delete(i);
end; // for
end;
MAPI 를 사용한걸로 기억되네요..
그럼 즐거운 프로그래밍 하세요~