Вниз
Скачать: 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 вся ветка

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



Память: 0.45 MB
Время: 0.012 c
1-38318
ИгорьК
2003-01-31 11:29
2003.02.13
DHTML Edit Control for IE 5.0


3-38014
VS2002
2003-01-29 03:13
2003.02.13
Сохранение файла-документа в таблице Oracle v8


1-38241
dadasdgyu
2003-02-05 12:27
2003.02.13
Как Показать Форму?


14-38487
Альберт
2003-01-15 02:44
2003.02.13
Нужны бета-тестеры


1-38293
den_dnepr
2003-02-05 13:56
2003.02.13
ФОКУС




   Наверх