Options

Open external mail client with RTC

akhofakhof Member Posts: 2
Hi,
I want to open an external mail client (e.g. Outlook) in NAV.
In the CC I use the automaition WSHShell and everything works fine.
For the RTC I tried to use the DotNet Sys.Diagnostic.Process, but nothing happens... :(
Has anyone an idea?

Here's my code:

Automation: com_WSHShell - 'Windows Script Host Object Model'.WshShell
DotNet: dtn_process - 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process

IF ISSERVICETIER THEN BEGIN
  dtn_process := dtn_process.Process;
  dtn_process.StartInfo.UseShellExecute := FALSE;
  dtn_process.StartInfo.FileName := 'rundll32.exe';
  dtn_process.StartInfo.Arguments := 'url.dll,FileProtocolHandler mailto:'+toAddress+'?subject='+subject;
  dtn_process.StartInfo.CreateNoWindow := FALSE;
  dtn_process.Start();
  CLEAR(dtn_process);
END ELSE BEGIN
  IF ISCLEAR(com_WSHShell) THEN
    CREATE(com_WSHShell);
  com_WSHShell.Run('rundll32.exe url.dll,FileProtocolHandler mailto:'+toAddress+'?subject='+subject);
END;

Best Answer

Answers

  • Options
    krikikriki Member, Moderator Posts: 9,096
    [Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    akhofakhof Member Posts: 2
    @Wisa123: Thank you! :smile:
Sign In or Register to comment.