0

Lô đề onlineI develop with DELPHI. 10.3 RIO.

I want to send mail via DELPHI with some attachment.

I tried use SimpleMapi or MAPISendMail (outlook 2016 32/64) or VIA OLE

i use the same code i wrote in : How to fix "send e-mail" via Delphi Winapi.Mapi?

until last month - All work fine (even if outlook was opened). for now, if outlook is closed - it's work.

But when the outlook is open – some machine work and some not (same win10 + same office 2016), there is error like : Server execution failed, ProgID: "Outlook.Application"

Lô đề onlinemaybe some one know why is it happen. i read that outlook is singleton - but why in some machine it work (with getActiveOleObject).

yossi

  • You need to provide a minimal reproducible example that demonstrates the issue. – Ken White Oct 14 at 1:24
  • That means the security context of your app does not match the security context of the outlook.exe process. COM system does not marshall calls between processes with different contexts.Is either process running whit elevated (Run As Administrator) rights? – Dmitry Streblechenko Oct 14 at 4:15
  • hi dimiry. thanks but it's not about "match the security context". in some machine with the same win10-office2016 it work and in some not... – mazluta Oct 15 at 7:19
  • b.t.w dimitry, the program i running with no special elevate. – mazluta Oct 15 at 7:33
  • They both have to be running in the same security context. See; brinsergey.com/questions/50952082/… and brinsergey.com/questions/29338902/… – Brian Oct 15 at 12:17

Browse other questions tagged or ask your own question.