MAPI Help Please!
-
When I use the MAPISendMail command with the MAPI_DIALOG flag it brings up the dialog in Outlook (loading mapi32.dll library) and Outlook Express (loading msoe.dll library). If the mail client is closed, the message will send in Outlook Express, but will sit in the outbox of Outlook until the program is opened and the send/receive button is pressed. How can I change this behavior? I can't create a new process of outlook.exe because I do not know if the mail has been sent before killing the process... Help please, last time I submitted this question I only got one response (which unfortunately did not work out). Thank you in advance... ~LizardWiz()
-
When I use the MAPISendMail command with the MAPI_DIALOG flag it brings up the dialog in Outlook (loading mapi32.dll library) and Outlook Express (loading msoe.dll library). If the mail client is closed, the message will send in Outlook Express, but will sit in the outbox of Outlook until the program is opened and the send/receive button is pressed. How can I change this behavior? I can't create a new process of outlook.exe because I do not know if the mail has been sent before killing the process... Help please, last time I submitted this question I only got one response (which unfortunately did not work out). Thank you in advance... ~LizardWiz()
Can you provide a code snippet of how you are using the mail API?
A rich person is not the one who has the most, but the one that needs the least.
-
When I use the MAPISendMail command with the MAPI_DIALOG flag it brings up the dialog in Outlook (loading mapi32.dll library) and Outlook Express (loading msoe.dll library). If the mail client is closed, the message will send in Outlook Express, but will sit in the outbox of Outlook until the program is opened and the send/receive button is pressed. How can I change this behavior? I can't create a new process of outlook.exe because I do not know if the mail has been sent before killing the process... Help please, last time I submitted this question I only got one response (which unfortunately did not work out). Thank you in advance... ~LizardWiz()
Essentially, later versions of Outlook are configured to do this, so as to slow the spread of email worms. See: http://support.microsoft.com/?kbid=290499[^] for information on how to alter this (and other security-related) behavior. Note: as far as i'm aware, this does not apply to Extended MAPI, so you may wish to give that a look. Or just tell your users it's for their own good. ;) Z
no one puts flowers
on a flower's grave
-
Can you provide a code snippet of how you are using the mail API?
A rich person is not the one who has the most, but the one that needs the least.
This is sort of it, except that I am also attaching a file with a MapiFileDesc structure... LPMAPILOGON lpfnMAPILogon; LPMAPISENDMAIL lpfnMAPISendMail; LPMAPILOGOFF lpfnMAPILogoff; LHANDLE lhSession; HMODULE hMAPILib; MapiRecipDesc sender = { 0, MAPI_ORIG, "anyone", "anyone@anywhere.com", 0, NULL }; MapiRecipDesc recipient = { 0, MAPI_TO, "someone@anywhere.com", NULL, 0, NULL }; MapiMessage message = { 0, "Some subject", "Some message text", NULL, NULL, NULL, 0, NULL, 1, &recipient, 0, NULL }; hMAPILib = LoadLibrary("either MAPI32.DLL or MSOE.DLL depending on MSO or MSOE"); lpfnMAPILogon = (LPMAPILOGON)GetProcAddress(hMAPILib, "MAPILogon"); lpfnMAPISendMail = (LPMAPISENDMAIL)GetProcAddress(hMAPILib, "MAPISendMail"); lpfnMAPILogoff = (LPMAPILOGOFF)GetProcAddress(hMAPILib, "MAPILogoff"); (*lpfnMAPILogon)(0, NULL, NULL, 0, 0, &lhSession); (*lpfnMAPISendMail)(lhSession, 0, &message, MAPI_DIALOG, 0); (*lpfnMAPILogoff)(lhSession, 0, 0, 0); FreeLibrary(hMAPILib); ~LizardWiz()