AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > E-Mailing From Access in Lotus Notes

Using MS Access - E-Mailing From Access in Lotus Notes


Expert: Scottgem - 7/1/2009

Question
Scott,
I've got my e-mail code set up and everything works fine:
Here is the small segment I am testing on:

Option Compare Database

Function EMAIL_TERMINAL_CONFIRMATION()
On Error GoTo EMAIL_TERMINAL_CONFIRMATION_Err

   Dim NotesDB As Object
   Dim NotesDoc As Object
   Dim NotesRTF As Object
   Dim NotesSession As Object
     
   Set NotesSession = CreateObject("Notes.NotesSession")
   Set NotesDB = NotesSession.GetDatabase("", "")
   Call NotesDB.OpenMail
   Set NotesDoc = NotesDB.createdocument
   Call NotesDoc.replaceitemvalue("Sendto", "EMAILADDRESS")
   Call NotesDoc.replaceitemvalue("Subject", "Whatever")
   Set NotesRTF = NotesDoc.CreateRichTextItem("body")
   Call NotesRTF.appendtext("Kevin,")
   Call NotesRTF.addnewline(1)
   Call NotesRTF.appendtext("This is a Test E-Mail")
   Call NotesRTF.addnewline(2)
   Call NotesDoc.Send(False)
   Set NotesSession = Nothing

EMAIL_TERMINAL_CONFIRMATION_Exit:
   Exit Function

EMAIL_TERMINAL_CONFIRMATION_Err:
   MsgBox Error$
   Resume EMAIL_TERMINAL_CONFIRMATION_Exit

End Function

My question is this.  In Lotus, I have access to several Mail Databases.  I would like to be able to choose the db it sends the e-mail from.  I am tired of sending it from my own because I always get the responses when all I did was set up the Report...
What portion of the Code allows me to pick the mailbox it goes out from?

Thanks!

Answer
I don't think any of that will do it. As I recall, Notes will send out the e-mail from the mailbox you are logged into. So if you want to send the mail from a different mailbox, Switch Users before you run your Access code.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.