Вниз
Скачать: 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.01 c
9-38009
Ach_Den
2002-07-02 09:46
2003.02.13
Подскажите - где бы найти ресурсов для игр (спрайты, звуки...)


14-38463
me2
2003-01-30 14:39
2003.02.13
Visual Basic


1-38238
Денис
2003-02-03 11:06
2003.02.13
Определение функций в ДЛЛ.


14-38470
werr
2003-01-30 17:52
2003.02.13
сколько взять за прогу?


14-38542
Паша
2003-01-28 16:01
2003.02.13
Инициализация полей формы (D4, Win9x)




   Наверх