MAPI Session Logon Fail when run as windows service

From: Horace Tang (horace_tang_at_email.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 22:00:34 +0800

I'm trying to write a vb program (.exe) to auto send emails (with excel file
as attachment) to an exchange server (which connects to a fax server so that
the excel files can fax out) (I know I need redemption to bypass the outlook
warning message)
However, the program always fails in the Logon method as follows when
running it as windows service (using srvany and srvinstrw)
ObjSession = CreateObject("MAPI.Session")
ObjSession.Logon "MailProfileName", "", False, True <- this generate
E_Logon_failed error

I have set the service startup account as the domain user account which has
the access right to login that "MailProfileName" mail profile but still
fails.
However, if I just excute the program in command prompt, everything is ok
(just that the dialog box prompts for the password for the domain user
account when the workstation is not logon to the domain)
The environment is window2000 pro with sp4, VB6 and outlook 2002 with sp2
(but I'm not sure if the exchange server is 5.5 or 2000)

I have been searching the solutions on the webs for days and all the webs
mentions that the above should be correct, could anyone help?



Relevant Pages

  • ASP.NET Security problem trying to access MAPI
    ... Because of limitation of our Exchange Server here in the office, ... I am using MAPI, via a MAPI .NET wrapper called MAPI33. ... i.e. my email account. ... Domain User, i.e. myself, hence when I tried to log-on to the email ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to create a MAPI profile from a service?
    ... Local service account cannot access any network resources. ... to run as a domain user to be able to talk to an Exchange server. ... Is there any setting somewhere to let LocalSystem account to call ...
    (microsoft.public.win32.programmer.messaging)
  • Outlook 2002/internal Exchange account/external POP3 account
    ... the Internet from this machine. ... Exchange Server for internal e-mail and the external e-mail account, ... when a user e-mails an Excel file using the "Send To" command from ...
    (microsoft.public.exchange.clients)
  • Dave Goldman help: rename AD user creates prob w autocomplete Outl
    ... When I rename an AD user account and Exchange Mailbox using the steps ... After renaming an Active Directory user account, the new user name and the ... I typed jwalter into Outlook, arrowed down, and deleted the name from the ... I rebuilt the Offline Address Book on the Exchange server and redownloaded ...
    (microsoft.public.exchange.admin)
  • Re: Exchange Password
    ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ... |> course of logging on to the Exchange server. ... if the local account uses the same ...
    (microsoft.public.windows.server.sbs)