Вниз
Скачать: 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.011 c
1-38177
wam
2003-02-04 18:11
2003.02.13
Вложение конструкторов


1-38198
pum5a
2003-02-03 18:19
2003.02.13
Как вызвать процедуру наследника


14-38445
Труп Васи Доброго
2003-01-30 15:07
2003.02.13
Помогите найти книгу


8-38399
phatom
2002-10-30 08:32
2003.02.13
Мерцание экрана при перерисовке.


1-38254
Dennis S
2003-02-05 11:11
2003.02.13
Где ошибка?




   Наверх