No announcement yet.

Discussion: Read new emails

  • Filter
  • Time
  • Show
Clear All
new posts

    Discussion: Read new emails

    This discussion is for
    Read New Emails

    After running the event email.txt("GetEmail","false") I get this error. I run Windows2000. Will this script run without keeping Outlook open all the times? Thanks Elmo

    11/29/2002 5:31:29 PM~!~Error~!~Script error in file: email.txt: 429:ActiveX component can't create object: 'MAPI.Session' in line 19


      I got the same error. Win2k AS, Outlook 2002.



        For me, it works with and w/o Outlook running. The code actually creates a new instance of the Outlook session object, so it's not really reliant on it being active.

        When you start Outlook, do you have to logon or does it start up w/your id/pswd automatically? What ver of Outlook? I'm running Outlook 2k and my profile saves my id/pswd, so I start and go.


          If it fails, search for cdo.dll. If it exists, check what version it is.

          CDO seems cluttered by the different flavors - CDO 1.21, CDO NTS, CDO W2k. Seemed like 1.21 would do the trick for most....but since it fails for some, I'll do a bit of research.


            Elmo, I did a search on my HD. It did not find this file. I hope this helps.


              Aldo, what email client/version are you using? I'd guess it's not Outlook, as I think it (or Exchange) would install the CDO library.

              Anyway, at one time MS had the files available for download, but they pulled em. Google found em for me here at this web site. [img]/infopop/emoticons/icon_biggrin.gif[/img]

              I'd be interested to hear if this works w/o Outlook, as in another email client. If the client is MAPI compliant, then CDO 1.21 should be able to talk to it....note the word SHOULD! [img]/infopop/emoticons/icon_wink.gif[/img]


                >>Aldo, what email client/version are you using? Outlook Express 5.50.4807
                Windows2000 Server

                >>Anyway, at one time MS had the files available
                I do not know if I'm of any help but I find on my system cdonts.dll. I download the files (3 files) and I added them into System32. They won't register when I run REGSVR32.EXE "c:\winnt\system32\CDO.DLL. I get LoadLibrary fail error, object not found.


                  I found out that the CDO installation is part of the office 2000 installation disk. As default looks like it is disabled. I enabled it and it installed the file into C:\Program Files\Common Files\System\Mapi\1033\NT. The program seems to work now (no script error) but it does not find new emails. I have in "options" MAPI enabled. Any other suggestions?


                    Aldo, CDONTS is a server side verion of I understand it. It's compatible w/CDO somewhat, but I believe that it is being replaced by CDO for W2k, which is not really that close to CDO.

                    What a freakin mess!!! [img]/infopop/emoticons/icon_mad.gif[/img]

                    As for your setup, I don't know what's up w/it. Just read that Outlook Express supports Simple MAPI only, so CDO won't talk to it. You'll probably need to move to Outlook if you want this script to work.

                    Good luck and thanks for trying!

                    [This message was edited by elmo on Saturday, 30 November 2002 at 10:57 PM.]


                      Simply set up an event to trigger on email received and place this script in the speech/scripts tab script to run field.

                      <pre class="ip-ubbcode-code-pre">
                      ' this script will access the email message that caused this event to trigger
                      ' it will then speak the subject line of the message
                      sub main()
                      dim index
                      dim subject

                      index = hs.MailTrigger
                      from = hs.MailFromDisplay(index)
                      subject = hs.MailSubject(index)
                      hs.speak "You have mail! Its from " & from & ". The subject is"
                      hs.speak subject

                      end sub

                      This does of course require Outlook express to be running.

                      ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.