Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2003.09.22;
Скачать: [xml.tar.bz2];

Вниз

mailto   Найти похожие ветки 

 
borg   (2003-07-16 08:49) [0]

Здраствуйте как с помощью
shellexecute(handle,"open","mailto:borg@memst.kz",nil,nil,sw_normal);
вставить ещё и текст сообщения


 
Vladislav   (2003-07-16 09:34) [1]

shellexecute(handle,"open","mailto:borg@memst.kz?subject=Test&body=Пишем%20текст%20сообщения%0Aвторая%20строка",nil,nil,sw_normal);

здесь:
%20 код символа "пробел"
%0A перенос строки

правда есть ограничение на длину 255 символов.


 
Gigabyte   (2003-07-16 15:24) [2]

И кирилицу тоже лучше писать через %.


 
Borman   (2003-07-21 11:54) [3]

Проще так:
uses MAPI

//------------------------------------------------------------------------------
Function SendMail(const From, Dest, Subject, Text, FileName: PChar): Integer;
var
Message: TMapiMessage;
Recipient, Sender: TMapiRecipDesc;
File_Attachment: TMapiFileDesc;

function MakeMessage: TMapiMessage;
begin
FillChar(Sender, SizeOf(Sender), 0);
Sender.ulRecipClass := MAPI_ORIG;
Sender.lpszAddress := From;

FillChar(Recipient, SizeOf(Recipient), 0);
Recipient.ulRecipClass := MAPI_TO;
Recipient.lpszAddress := Dest;

FillChar(File_Attachment, SizeOf(File_Attachment), 0);
File_Attachment.nPosition := ULONG(-1);
File_Attachment.lpszPathName := FileName;

FillChar(Result, SizeOf(Result), 0);
with Message do begin
lpszSubject := Subject;
lpszNoteText := Text;
lpOriginator := @Sender;
nRecipCount := 1;
lpRecips := @Recipient;
nFileCount := 1;
lpFiles := @File_Attachment;
end;
end;

var
SM: TFNMapiSendMail;
MAPIModule: HModule;
begin
MAPIModule := LoadLibrary(PChar(MAPIDLL));
if MAPIModule = 0 then
Result := -1
else
try
@SM := GetProcAddress(MAPIModule, "MAPISendMail");
if @SM <>nil then begin
MakeMessage;
Result := SM(0, 0, Message,MAPI_RECEIPT_REQUESTED {0}, 0);
end else Result := 1;
finally
( MAPIModule)
Проще так:
uses MAPI

//------------------------------------------------------------------------------
Function SendMail(const From, Dest, Subject, Text, FileName: PChar): Integer;
var
Message: TMapiMessage;
Recipient, Sender: TMapiRecipDesc;
File_Attachment: TMapiFileDesc;

function MakeMessage: TMapiMessage;
begin
FillChar(Sender, SizeOf(Sender), 0);
Sender.ulRecipClass := MAPI_ORIG;
Sender.lpszAddress := From;

FillChar(Recipient, SizeOf(Recipient), 0);
Recipient.ulRecipClass := MAPI_TO;
Recipient.lpszAddress := Dest;

FillChar(File_Attachment, SizeOf(File_Attachment), 0);
File_Attachment.nPosition := ULONG(-1);
File_Attachment.lpszPathName := FileName;

FillChar(Result, SizeOf(Result), 0);
with Message do begin
lpszSubject := Subject;
lpszNoteText := Text;
lpOriginator := @Sender;
nRecipCount := 1;
lpRecips := @Recipient;
nFileCount := 1;
lpFiles := @File_Attachment;
end;
end;

var
SM: TFNMapiSendMail;
MAPIModule: HModule;
begin
MAPIModule := LoadLibrary(PChar(MAPIDLL));
if MAPIModule = 0 then
Result := -1
else
try
@SM := GetProcAddress(MAPIModule, "MAPISendMail");
if @SM <>nil then begin
MakeMessage;
Result := SM(0, 0, Message,MAPI_RECEIPT_REQUESTED {0}, 0);
end else Result := 1;
finally
FreeLibrary(MAPIModule);
end;
end;
//------------------------------------------------------------------------------



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2003.09.22;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.45 MB
Время: 0.01 c
1-71709
Dysan
2003-09-10 18:01
2003.09.22
работа с Excel 2000


1-71724
Genri
2003-09-10 15:26
2003.09.22
переменная Path


14-71924
ZeroDivide
2003-09-01 15:22
2003.09.22
Выборы в России. За кого голосовать?


14-71880
Hawk2
2003-09-03 16:04
2003.09.22
Что там внутри?


3-71533
Chery
2003-09-02 13:56
2003.09.22
Выдаёт ошибку в SQL при использов. ф-ции Max() с др. полями.





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский