How to avoid Outlook Security pop up when trying to send the mail -- WIN Api to simulate the click

  • Thread starter Thread starter vikash
  • Start date Start date
V

vikash

Hi,

In one of my current application, I am sending the mail by using the
Outlook API. The problem is that whenever it is trying to send the
mail, it gives me the security warning saying that "external program is
trying to send the mail". This is due the the security feature of
outlook. But I want to avoid this pop up.

Can any body help me how we can avoid the same??

To avoid the same, i was trying to simulate the click of YES button in
the pop up programatically. But even that does not work. I am using the
following lines of code for the same

SendMessage(btnYesPtr, WM_LBUTTONUP, 0, 0);
SendMessage(btnYesPtr, WM_LBUTTONUP, 0, 0);
SendMessage(btnYesPtr, BM_SETSTATE, 1, 0);

Can any body tell me what can the problem in the same.

Thanks in advance
Vikash
 
Hi

Thanks for the reply.
But i dont want to go for any of the paid 3rd party.

I am very surprised for why the similation of Yes Button is not
working. It works fine for all the other window.
what can ne the other option that i can consider

--Vikash
 
That is part of the Outlook Security model I believe. Now, if all a virus
writer had to do was to add a couple lines of code to click the yes button,
the security would be pointless.

If you don't want to deal with the security, take a look at programming MAPI
(I think it's simple or extended) I think if you use C++ and MAPI, you can
get around the security model. Take a look at NG
microsoft.public.win32.programmer.messaging


HTH,
Brian
 
Back
Top