Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MAPI/CDO from an NT Service

MAPI/CDO from an NT Service

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminalgorithmshelpquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thowra
    wrote on last edited by
    #1

    I've been tasked with looking at sorting some CDO code which runs in an NT service. It works fine from a console but when I run it as an NT service it fails when trying to log on to an Exchange 2000 server. The code uses CDO rather than Extended MAPI (which is what I would've used), and I'm tempted to rewrite it in MAPI, but it would potentially take a lot longer than just trying to fix the existing code. I know there were issues with CDO in an NT service for Exchange 4.0 and I've have found various suggestions that CDO from an NT service is definitely not recommended. Can anyone shed some light on this topic? I'm happy to rewrite using MAPI but I may need some sort of justification for the effort required. Also, does anyone know of anny decent resources other than MSDN for CDO wrt source code, problems, bugs etc. "The folly of man is that he dreams of what he can never achieve rather than dream of what he can." "If you think education is expensive, try ignorance."

    X 1 Reply Last reply
    0
    • T thowra

      I've been tasked with looking at sorting some CDO code which runs in an NT service. It works fine from a console but when I run it as an NT service it fails when trying to log on to an Exchange 2000 server. The code uses CDO rather than Extended MAPI (which is what I would've used), and I'm tempted to rewrite it in MAPI, but it would potentially take a lot longer than just trying to fix the existing code. I know there were issues with CDO in an NT service for Exchange 4.0 and I've have found various suggestions that CDO from an NT service is definitely not recommended. Can anyone shed some light on this topic? I'm happy to rewrite using MAPI but I may need some sort of justification for the effort required. Also, does anyone know of anny decent resources other than MSDN for CDO wrt source code, problems, bugs etc. "The folly of man is that he dreams of what he can never achieve rather than dream of what he can." "If you think education is expensive, try ignorance."

      X Offline
      X Offline
      Xiangyang Liu
      wrote on last edited by
      #2

      The problem, I think, is that your NT service is running under a different account (typically LocalSystem) therefore cannot open the appropriate e-mail connection. What you can do is, reconfigure the NT service to run under the correct user account (the account that owns the e-mail profile, etc.). You can also write your code as a regular program (not as a service) and start your program with XYNTService[^].[

      My articles and software tools

      ](http://hometown.aol.com/XiangYangL/)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups