Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 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.47 MB
Время: 0.013 c
1-38295
NewAndrey
2003-02-05 20:02
2003.02.13
---|Ветка была без названия|---


14-38546
michelin
2003-01-28 21:06
2003.02.13
Для курсовой по Delphi нужен ERwin4.0


1-38175
Pk
2003-02-04 17:32
2003.02.13
Цветная рамка на форме


3-38123
karan1
2003-01-28 12:16
2003.02.13
(XML) SAX ... что посоветуете...


1-38263
Strech
2003-02-05 16:09
2003.02.13
Каталоги