Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 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.048 c
15-1136959135
Барлог(с)
2006-01-11 08:58
2006.01.29
И снова про "Начинающим"


15-1136048842
Arazel
2005-12-31 20:07
2006.01.29
Нужна полная документация и если можно примеры по NTFS


2-1137064344
Practicant
2006-01-12 14:12
2006.01.29
Узнать ширину текста...


4-1132430885
Serafim-s
2005-11-19 23:08
2006.01.29
Передача файлов по RS232


15-1136460887
tim@eclear.net
2006-01-05 14:34
2006.01.29
Wanted - Delphi Developers in moscow