Текущий архив: 2006.01.29;
Скачать: CL | DM;
Вниз
Отправка электронной почты Найти похожие ветки
← →
Максим (2005-10-21 12:55) [0]Помогите!!! Как программно осуществить отправку электронной почты (The Bat), с вложение.
← →
clickmaker © (2005-10-21 12:58) [1]MAPISendMail
← →
Максим (2005-10-21 12:59) [2]ОК! Спасибо! можно пример, желательно рабочий
← →
clickmaker © (2005-10-21 13:03) [3]Вот на Си. На паскаль сам переводи
HINSTANCE HInst = LoadLibrary("mapi32.dll");
LPMAPISENDMAIL MapiSendMail = (LPMAPISENDMAIL)GetProcAddress(HInst, "MAPISendMail");
MapiMessage MapiMessage;
MapiRecipDesc SenderDesc;
MapiRecipDesc RecipDesc;
MapiFileDesc Files;
ULONG HResult;
memset(&SenderDesc,"\0",sizeof(SenderDesc));
SenderDesc.ulRecipClass = MAPI_ORIG;
RecipDesc.ulReserved = 0;
RecipDesc.ulRecipClass = MAPI_TO;
RecipDesc.lpszName ="Test";
RecipDesc.lpszAddress ="SMTP:a@b.c";
RecipDesc.ulEIDSize = 0;
RecipDesc.lpEntryID = 0;
Files.ulReserved = 0;
Files.flFlags = 0;
Files.nPosition = -1;
Files.lpszPathName = "c:\\BOOT.INI";
Files.lpszFileName = "BOOT.INI";
Files.lpFileType = NULL;
MapiMessage.ulReserved = 0;
MapiMessage.lpszSubject = "Subject";
MapiMessage.lpszNoteText = "This text will \r\nappear";
MapiMessage.lpszMessageType = NULL;
MapiMessage.lpszDateReceived = NULL;
MapiMessage.lpszConversationID = NULL;
MapiMessage.flFlags = 0;
MapiMessage.lpOriginator = &SenderDesc;
MapiMessage.nRecipCount = 1;
MapiMessage.lpRecips = &RecipDesc;
MapiMessage.nFileCount = 1;
MapiMessage.lpFiles = &Files;
HResult =(*MapiSendMail)(0, (ULONG)Application->Handle, &MapiMessage,
MAPI_DIALOG | MAPI_LOGON_UI | MAPI_NEW_SESSION, 0);
FreeLibrary(HInst);
← →
wp2 (2005-10-22 23:50) [4]Ага, а попробуйте без mapi32.dll, а только с помощью Winsock.dll
Страницы: 1 вся ветка
Текущий архив: 2006.01.29;
Скачать: CL | DM;
Память: 0.47 MB
Время: 0.049 c