• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 467
  • Last Modified:

Using Access 2003 to send E-mail through Lotus Notes

I am trying use Access 2003 to send e-mail through Lotus Notes. I have login with my account. But when I execute the code "Set mailDb = Session.GetDatabase("", "mail\hching.nsf")", it prompts "user CN=Howard HW Ching/O=TheLinkMgt cannot open database CN=LMMAIL01/O=TheLinkMgt!!mail\shcfu.nsf". shcfu.nsf is the file used by the previous user of the PC (he no longer used this PC).

Why? Can anybody help me?

Dim mailDb As Object
Dim Username As String
Dim MailDBName As String
Dim mailDoc As Object
Dim Session As Object
Set Session = CreateObject("Notes.NotesSession")
Username = Session.Username
Set mailDb = Session.GetDatabase("", "mail\hching.nsf")
If mailDb.IsOpen = True Then
Else
mailDb.OPENMAIL
End If
Set mailDoc = mailDb.CreateDocument
mailDoc.Form = "Memo"
mailDoc.sendto = "Howard HW Ching"
mailDoc.Subject = "testing"
mailDoc.body = "Testing messgae"
mailDoc.SaveMessageOnSend = True
mailDoc.posteddate = Now()
mailDoc.Send 0, Recipient
Set mailDb = Nothing
Set mailDoc = Nothing
Set Session = Nothing

Regards
Howard
0
howardching
Asked:
howardching
  • 2
1 Solution
 
qwaleteeCommented:
Open Notes, then choose...

    (R5)    File -> Tools -> Switch ID
    (R6)    File -> Security -> Switch ID

... and change to your ID file.  That should make it work.  If it does not work at that opint, you probably have multiple copies of Notes, or multiple copies of NOTES.INI available.
0
 
qwaleteeCommented:
One other thing... make sure your LOCATION DOCUMENT has the correct mail file listed.

    File -> Preferences -> Location preferences
    Click MAIL tab
    Make sure it has your mail file
    Also check server tab, make sure home server is your mail server
    Click SAVE & CLOSE
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now