Reading mails from outlook mail from lotus notes client application

Lotus Domino
Microsoft Exchange
Dear team, I need to read mails from a outlook mailbox on a regular basis and create documents in a lotus notes client based application.The mail content will be used to create notes documents. Please suggest me a effective way of doing this.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You need to use the Microsoft CDO 1.2.1 or MAPI Active X components with LotusScript.
They are documented on the Microsoft Developer’s Network website

An example (to write a message rather than read one, but usage is similar) from their documentation follows.

CDO 1.2.1
Quick Start
The following example demonstrates how easy it is to add messaging to your applications when you use Microsoft® Visual Basic® or Visual Basic for Applications.

In this code fragment, we first create a Session object and log on. We then create a Message object and set its properties to indicate its subject and content. Next we create a Recipient object and call its Resolve method to obtain a full messaging address. We then call the Message object’s Send method to transmit the message. Finally, we display a completion message and log off.

‘ This sample uses Visual Basic 3.0 error handling.

Function QuickStart()
Dim objSession As MAPI.Session ‘ use early binding for more efficient
Dim objMessage As Message ‘ code and type checking
Dim objOneRecip As Recipient

On Error GoTo error_olemsg

‘ create a session and log on — username and password in profile
Set objSession = CreateObject(“MAPI.Session”)
‘ change the parameters to valid values for your configuration
objSession.Logon profileName:=”Sender Name”

‘ create a message and fill in its properties
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Subject = “Sample Message”
objMessage.Text = “This is sample message text.”

‘ create the recipient
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = “Recipient Name”
objOneRecip.Type = CdoTo
objOneRecip.Resolve ‘ get MAPI to determine complete e-mail address

‘ send the message and log off
objMessage.Send showDialog:=False
MsgBox “The message has been sent”
Exit Function

MsgBox “Error ” & Str(Err) & “: ” & Error$(Err)
Exit Function

End Function

The CDO Library invalidates the Message object after you call its Send method. This code fragment logs off to end the session after sending the message, but if you continued the MAPI session, you could avoid potential errors by setting the Message object to Nothing.

© 2000-2001 Microsoft Corporation. All rights reserved.

Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Malarkey
    Depending on the detailed requirements, another way might be to setup a scheduled IMAP connection to read the messages from the Exchange server into your mailbox and add a simple agent to your mailbox to copy some or all of the content of checked messages to the target Notes application ... or a scheduled agent which processes messages identified by routing information.
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: