Вниз
Скачать: CL | DM;

Люди помогите плиз с MAPI !!!!!!!!!!   Найти похожие ветки 

 
X-shadow ©   (2002-10-31 18:16) [0]


Помогите пожалуйста написать письмо из Mapi.
Просто как заполнить поля и все такое


 
X-shadow ©   (2002-10-31 18:23) [1]

Вот это помогите обработать

function SendMail(const From, Dest, Subject, Text, FileName: PChar):
Integer;
var
Message: TMapiMessage;
Recipient, Sender: TMapiRecipDesc;
File_Attachment: TMapiFileDesc;

function MakeMessage: TMapiMessage;
begin
FillChar(Sender, SizeOf(Sender), 0);
Sender.ulRecipClass := MAPI_ORIG;
Sender.lpszAddress := From;

FillChar(Recipient, SizeOf(Recipient), 0);
Recipient.ulRecipClass := MAPI_TO;
Recipient.lpszAddress := Dest;

FillChar(File_Attachment, SizeOf(File_Attachment), 0);
File_Attachment.nPosition := ULONG(-1);
File_Attachment.lpszPathName := FileName;

FillChar(Result, SizeOf(Result), 0);
with Message do begin
lpszSubject := Subject;
lpszNoteText := Text;
lpOriginator := @Sender;
nRecipCount := 1;
lpRecips := @Recipient;
nFileCount := 1;
lpFiles := @File_Attachment;
end;
end;

var
SM: TFNMapiSendMail;
MAPIModule: HModule;
begin
MAPIModule := LoadLibrary(PChar(MAPIDLL));
if MAPIModule = 0 then
Result := -1
else
try
@SM := GetProcAddress(MAPIModule, "MAPISendMail");
if @SM <> nil then begin
MakeMessage;
Result := SM(0, 0, Message, 0, 0);
end else Result := 1;
finally
FreeLibrary(MAPIModule);
end;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.012 c
1-33959
DN
2002-11-01 11:29
2002.11.11
---|Ветка была без названия|---


1-34014
DelphiDummy
2002-11-02 13:59
2002.11.11
Constant expression violates subrange bound


3-33902
lety
2002-10-22 22:17
2002.11.11
скорость обработки и нажатия кнопки!


1-34050
vow
2002-10-30 20:24
2002.11.11
file.log


1-34012
Кен
2002-11-02 07:28
2002.11.11
Глюк! У меня в файле справки которая вызывается по F1 исчез Указа




   Наверх