Ovaj kod sam pronasao na ovom forumu, hvala autoru

, jedini problem je u tome sto pod WinXP radi normalno ali pod 98 vraca error code 1 (MAPI_E_USER_ABORT).
Please help
Code:
MapiRecipients[0].ulReserved = 0;
MapiRecipients[0].ulRecipClass = MAPI_TO;
MapiRecipients[0].lpszName = szToRecipName;
MapiRecipients[0].lpszAddress = szToRecipAddress;
MapiRecipients[0].ulEIDSize = 0;
MapiRecipients[0].lpEntryID = NULL;
MapiFiles[0].nPosition=-1;
MapiFiles[0].lpszPathName=szFileName;
MapiFiles[0].flFlags=NULL;
MapiFiles[0].lpszFileName=NULL;
MapiFiles[0].lpFileType=NULL;
MapiMessage.ulReserved = 0;
MapiMessage.lpszSubject = szSubjectMatter;
MapiMessage.lpszNoteText = szBodyOfText;
MapiMessage.lpszMessageType = NULL;
MapiMessage.lpszDateReceived = NULL;
MapiMessage.lpszConversationID = NULL;
MapiMessage.flFlags = 0;
MapiMessage.lpOriginator = NULL;
MapiMessage.nRecipCount = 1;
MapiMessage.lpRecips = MapiRecipients;
MapiMessage.nFileCount = 1;
MapiMessage.lpFiles = MapiFiles; //necemo imati attachementa ...
try
{
MError = MapiSendMail(0,
reinterpret_cast<unsigned int>(Application->Handle),
MapiMessage,
MAPI_LOGON_UI | MAPI_NEW_SESSION,
0);
if (MError)
{
MessageDlg("Greska prilikom slanja mejla!", mtInformation, TMsgDlgButtons() << mbOK, 0);
}
}
catch(...)
{
return false;
}
Razlika izmedju softvera i hardvera je:
Softver je nesto sto mozes psovati, a hardver je... pa hardver je nesto sto mozes sutati