🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #739

Re: How display MAPIMAIL

#739
From: RS
Date: Fri, 03 Mar 2006 21:20
150 lines
6491 bytes
Ok, no problem, i'm finding !!!

This registry key changes according to default mapi program :

HKEY_CLASSES_ROOT\mailto\shell\open\command

for MS Outlook :
"C:\PROGRA~1\MICROS~2\OFFICE11\OUTLOOK.EXE" -c IPM.Note /m "%1"

"Office11" is Office 2003, if you have office 2000 ("office")  or Office XP 
("office10")

for OE :
"%ProgramFiles%\Outlook Express\msimn.exe" /mailurl:%1

I can integrate a code which will read the registry and will launch the 
adequate source code !!

I'm a genius !!! (joke)  no ! no ! no ! i'm not a genius, the best is ... 
Remy of course !!!  lol

Many thanks, I think of being able me to leave there with all that


"RS" <rs.reloaded@wanadoo.fr> a �crit dans le message de news: 
4408acfe$1@newsgroups.borland.com...
> My friend has the same problem with Visual Basic langage, he must have 2 
> programs : One for OE and one for Ms Outlook.
>
>
> "RS" <rs.reloaded@wanadoo.fr> a �crit dans le message de news: 
> 4408ac02@newsgroups.borland.com...
>> Hey Hey Hey !!!
>>
>> I'm finding this following source code, and it works with outlook 2003 
>> !!!
>>
>> I'm finally 2 sources codes that works with the 2 softwares OE and Ms 
>> Outlook.
>>
>> I want to identify which software is the mapi default program, how can I 
>> find this ?
>>
>> //-------------------------------------------------------------
>> LPMAPISENDMAIL pfnSendMail;
>>   MapiRecipDesc  rdOriginator;
>>   MapiRecipDesc  rdRecipient[1];
>>   LPMAPILOGOFF   pfnLogoff;
>>   LPMAPILOGON    pfnLogon;
>>   MapiMessage    mapimsg;
>>   HINSTANCE      hDll;
>>   LHANDLE        lHnd;
>>   MapiFileDesc   mapifiledesc[2];
>>
>>   if(NULL == (hDll = LoadLibrary(TEXT("MAPI32.DLL"))))
>>   {
>>       _tprintf(TEXT("could not load mapi32.dll, ErrorCode: %u"), 
>> GetLastError());
>>   }
>>   pfnLogon    = (LPMAPILOGON)GetProcAddress(hDll, "MAPILogon");
>>   pfnLogoff   = (LPMAPILOGOFF)GetProcAddress(hDll, "MAPILogoff");
>>   pfnSendMail = (LPMAPISENDMAIL)GetProcAddress(hDll, "MAPISendMail");
>>
>>   pfnLogon(0, NULL, NULL, 0, 0, &lHnd);
>>
>>   mapimsg.ulReserved   = 0;
>>   mapimsg.lpszSubject  = "This is the Subject";
>>   mapimsg.lpszNoteText = "This is the Body Message";
>>   mapimsg.lpszMessageType    = NULL;
>>   mapimsg.lpszDateReceived   = NULL;
>>   mapimsg.lpszConversationID = NULL;
>>   mapimsg.flFlags      = MAPI_UNREAD;
>>
>>   mapimsg.lpOriginator = &rdOriginator;
>>   mapimsg.nRecipCount  = NUM_ELEMENTS(rdRecipient);
>>   mapimsg.lpRecips     = rdRecipient;
>>   mapimsg.nFileCount   = 2;
>>   mapimsg.lpFiles      = &mapifiledesc[0];
>>
>>   rdOriginator.ulReserved   = 0;
>>   rdOriginator.ulRecipClass = MAPI_ORIG;
>>   rdOriginator.lpszName     = "rdOriginator";
>>   rdOriginator.lpszAddress  = "adresse@expediteur.com"; // Expediteur
>>   rdOriginator.ulEIDSize    = 0;
>>   rdOriginator.lpEntryID    = NULL;
>>
>>   rdRecipient[0].ulReserved   = 0;
>>   rdRecipient[0].ulRecipClass = MAPI_TO;
>>   rdRecipient[0].lpszName     = "Name";
>>   rdRecipient[0].lpszAddress  = "adresse@destinataire.com";   // 
>> Destinataire
>>   rdRecipient[0].ulEIDSize    = 0;
>>   rdRecipient[0].lpEntryID    = NULL;
>>
>>   mapifiledesc[0].ulReserved   = 0;
>>   mapifiledesc[0].flFlags      = 0;
>>   mapifiledesc[0].nPosition    = -1;
>>   mapifiledesc[0].lpszPathName = "C:\\test.txt";
>>   mapifiledesc[0].lpszFileName = "test.txt";
>>   mapifiledesc[0].lpFileType   = 0;
>>
>>   mapifiledesc[1].ulReserved   = 0;
>>   mapifiledesc[1].flFlags      = 0;
>>   mapifiledesc[1].nPosition    = -1;
>>   mapifiledesc[1].lpszPathName = "C:\\test.pdf";
>>   mapifiledesc[1].lpszFileName = "test.pdf";
>>   mapifiledesc[1].lpFileType   = 0;
>>   pfnSendMail(lHnd,0, &mapimsg,MAPI_DIALOG,0);
>>   pfnLogoff(lHnd, 0, 0, 0);
>>   FreeLibrary(hDll);
>> //------------------------------------------------------------------------------------
>>
>>
>> "Remy Lebeau (TeamB)" <no.spam@no.spam.com> a �crit dans le message de 
>> news: 4408a934@newsgroups.borland.com...
>>>
>>> "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
>>> news:4408a7d4$1@newsgroups.borland.com...
>>>
>>>> I can't answer that.  I just tried it on Outlook 2000 and got the same
>>>> error.  Removing the attachments results in error 2 (MAPI_E_FAILURE) 
>>>> being
>>>> reported instead of 11.
>>>
>>> I can tell you, though, that I use similar code on other machines and it
>>> works fine.  However, that code is logging into an actual mail profile
>>> (specifying a non-empty string for the lpszProfileName parameter), 
>>> whereas
>>> the code in this discussion in not.  That might make a difference.  You 
>>> can
>>> look up the default profile in the Registry:
>>>
>>>    Under Win9x/Me:
>>>        HKCU\Software\Microsoft\Windows Messaging Subsystem\Profiles
>>>        "DefaultProfile"="the name of the default profile"
>>>
>>>    Under WinNT/2K/XP/2K3:
>>>        HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows 
>>> Messaging
>>> Subsystem\Profiles
>>>        "DefaultProfile"="the name of the default profile"
>>>
>>>
>>> Gambit
>>>
>>>
>>
>>
>
> 
Technical Details
Message-ID: <4408b243@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4402040f@newsgroups.borland.com> <4404bbf5$1@newsgroups.borland.com> <4404fe85$1@newsgroups.borland.com> <440602dc$1@newsgroups.borland.com> <44064ed2$1@newsgroups.borland.com> <44073e03$1@newsgroups.borland.com> <4407681b$1@newsgroups.borland.com> <44088be9@newsgroups.borland.com> <44088e3f$1@newsgroups.borland.com> <4408910d@newsgroups.borland.com> <4408a7d4$1@newsgroups.borland.com> <4408a934@newsgroups.borland.com> <4408ac02@newsgroups.borland.com> <4408acfe$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,b415d4e666b19fd4
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII
From: "RS" <rs.reloaded@wanadoo.fr>
Newsgroups: borland.public.cppbuilder.internet.web
References: <4402040f@newsgroups.borland.com> <4404bbf5$1@newsgroups.borland.com> <4404fe85$1@newsgroups.borland.com> <440602dc$1@newsgroups.borland.com> <44064ed2$1@newsgroups.borland.com> <44073e03$1@newsgroups.borland.com> <4407681b$1@newsgroups.borland.com> <44088be9@newsgroups.borland.com> <44088e3f$1@newsgroups.borland.com> <4408910d@newsgroups.borland.com> <4408a7d4$1@newsgroups.borland.com> <4408a934@newsgroups.borland.com> <4408ac02@newsgroups.borland.com> <4408acfe$1@newsgroups.borland.com>
Subject: Re: How display MAPIMAIL
Date: Fri, 3 Mar 2006 22:20:38 +0100
Lines: 152
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 83.194.66.101
Message-ID: <4408b243@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141420611 83.194.66.101 (3 Mar 2006 13:16:51 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail