Текущий архив: 2003.02.13;
Скачать: CL | DM;
Вниз
Как послать e-mail без специальных компонентов? Найти похожие ветки
← →
Oskolok (2002-12-22 19:24) [0]Подскажите плиз, как послать e-mail без специальных компонентов?
Если можно приведите пример...
← →
int64 (2002-12-22 20:43) [1]http://delphi.mastak.ru/cgi-bin/forum.pl?look=1&id=1040092570&n=4
← →
Хмырь (2002-12-22 20:52) [2]Этот пример кочует из ветки в ветку:
unit email;
interface
uses Windows;
function SendEmail(const RecipName, RecipAddress, Subject, Attachment: string): Boolean;
implementation
uses Mapi;
function SendEmail(const RecipName, RecipAddress, Subject, Attachment: string): Boolean;
var
MapiMessage: TMapiMessage;
MapiFileDesc: TMapiFileDesc;
MapiRecipDesc: TMapiRecipDesc;
begin
with MapiRecipDesc do
begin
ulReserved:= 0;
ulRecipClass:= MAPI_TO;
lpszName:= PChar(RecipName);
lpszAddress:= PChar(RecipAddress);
ulEIDSize:= 0;
lpEntryID:= nil;
end;
with MapiFileDesc do
begin
ulReserved:= 0;
flFlags:= 0;
nPosition:= 0;
lpszPathName:= PChar(Attachment);
lpszFileName:= nil;
lpFileType:= nil;
end;
with MapiMessage do begin
ulReserved := 0;
lpszSubject := nil;
lpszNoteText := PChar(Subject);
lpszMessageType := nil;
lpszDateReceived := nil;
lpszConversationID := nil;
flFlags := 0;
lpOriginator := nil;
nRecipCount := 1;
lpRecips := @MapiRecipDesc;
if length(Attachment) > 0 then begin
nFileCount:= 1;
lpFiles := @MapiFileDesc;
end else begin
nFileCount:= 0;
lpFiles:= nil;
end;
end;
Result:= MapiSendMail(0, 0, MapiMessage, MAPI_DIALOG or MAPI_LOGON_UI or MAPI_NEW_SESSION, 0) = SUCCESS_SUCCESS;
end;
end.
Страницы: 1 вся ветка
Текущий архив: 2003.02.13;
Скачать: CL | DM;
Память: 0.45 MB
Время: 0.009 c