?
Solved

MAPI and windows 2002

Posted on 2003-03-24
1
Medium Priority
?
282 Views
Last Modified: 2012-05-04
I have an application that sends an email using the MAPI objects within ASP. This works no problem at all on a computer with windows 98 as the operating system. How ever as soon as you try to use the application on a windows 2000 machine an error occurs, and not only that the error is very un help full. I think that it is unable to find out look as the default email. The code is below, this is a little different to normal as the application was created using a web class. basically i would like to know if this is a known problem, or weather there are new objects within windows 2000 that MAPI can use?


SUB MailIt_onclick

 On Error Resume Next

 Dim mpsSession, mpmMessage, objRecipient

 set mpsSession=CreateObject("MAPI.Session")

 mpsSession.Logon("<KENTON@USERNAME></KENTON@USERNAME>")
 IF Err.Number <> 0 THEN
  MSGBOX "ERROR : Problem logging into email account, " & err.description
 ELSE
   set mpmMessage=mpsSession.Outbox.Messages.Add

   mpmMessage.subject= "<KENTON@SUBJECT></KENTON@SUBJECT>"
   mpmMessage.text = message.innertext

   <KENTON@RECIPIENTS></KENTON@RECIPIENTS>

   IF mpmMessage.Recipients.count > 0 THEN
     mpmMessage.Send showDialog=False

     IF Err.Number <> 0 THEN
      MSGBOX "ERROR : Problem sending email, " & err.description
     ELSE
       mpsSession.LogOff  
       SET mpsSession = NOTHING
       SET mpmMessage = NOTHING
       SET objRecipient = NOTHING
       insertmessage.submit
     END IF

   ELSE
     msgbox "There are no email recipients set ! Hit the re-write report button and add them."
     SET mpsSession = NOTHING
     SET mpmMessage = NOTHING
     SET objRecipient = NOTHING  
   END IF

 END IF

END SUB

Many thanks
Anthony Lewis
0
Comment
Question by:lewisant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
yuhaian earned 200 total points
ID: 8338462
MAPI need a userid can use Outlook. By default, 2000 WWW service run on system as its id. This id cannot run Outlook. A service started as system id cannot access outlook or other MAPI SERVICE.

Here is An easy solution for you. Find an userid can run outlook, e.g. your id. Using this id to run www service.

Here is the step to use YourID to run www service:
1.) Click on start, Settings, Control panel, Administrative Tools, Services;
2.) Right click on WWW service to see its properties
On "Log On" tab, select this account radio button, fill your id an password in. Click OK to exit.
3.) Restart WWW service, and try your asp again.

Good Luck :-)

0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question