Lotus Notes Email. 
Author Message
 Lotus Notes Email.

Hi,

I have a multi-user application that is installed on 90+ workstations.
Unfortunately I am in another building, and I have to make frequent trips to
view Error Log files etc. when things go wrong.  Every workstation has Lotus
Notes 4.5 installed and running.  What I would like to do is be more
efficient and get my program to generate an email to me when an error
occurs, so that I am aware of the errors immediately, and have the full
information on it, rather than waiting for the helpdesk to raise paperwork
etc.

I have had a look at the Type Library that comes with this version of Notes,
but cannot get the Object Browser to display any Help.  Does anybody have
any example code to achieve this?

Cheers in advance.

Carl Williams
T.S.P. Ltd.

If you can please reply to the email address below.



Fri, 25 Jan 2002 03:00:00 GMT  
 Lotus Notes Email.
Hello Carl,

To get this to work you need to add a the Lotus Notes Automation Classes to your
project / references.  Then you can create objects that are instances of the
notes classes.

Dim session As Object
Dim db As Object
Dim doc As Object
Dim rtfield As Object
Dim attachment As Object

Const EMBED_ATTACHMENT = 1454
Set session = CreateObject("Notes.NotesSession")
Set db = session.CurrentDatabase
Set doc = db.CreateDocument
doc.Form = "Memo"
doc.Subject = "Error Report."
doc.SendTo = "<your email address>"
Set rtfield = doc.CreateRichTextItem("Body")
' Here you can either append text to the field using the rtfield.AppendText
method or
' you can attach the log file using the rtfield.EmbedObject method.  The syntax
is exactly
' the same as the syntax specified in LotusScript
Set attachment = rtfield.EmbedObject(EMBED_ATTACHMENT, "", "<file path>")
Call doc.Send(False)

That should do it for you, although I haven't tested it.  If you have any
problems or questions, e-mail me.

Michael Fariborz
IBM - Global Government Industries
Houston, TX

Quote:

> Hi,

> I have a multi-user application that is installed on 90+ workstations.
> Unfortunately I am in another building, and I have to make frequent trips to
> view Error Log files etc. when things go wrong.  Every workstation has Lotus
> Notes 4.5 installed and running.  What I would like to do is be more
> efficient and get my program to generate an email to me when an error
> occurs, so that I am aware of the errors immediately, and have the full
> information on it, rather than waiting for the helpdesk to raise paperwork
> etc.

> I have had a look at the Type Library that comes with this version of Notes,
> but cannot get the Object Browser to display any Help.  Does anybody have
> any example code to achieve this?

> Cheers in advance.

> Carl Williams
> T.S.P. Ltd.

> If you can please reply to the email address below.




Fri, 25 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Send email from Acc97 to Lotus notes email.

2. VB5.0 & Lotus Notes email - recommendations Please

3. lotus note email

4. Creating but not sending a Lotus Notes email

5. VB help, with lotus notes email generator

6. Lotus notes emails using vba & Excel

7. Help - Creating a Lotus Notes Document in a local Lotus Notes DB with VB6

8. VBA code to send an email message through Lotus Notes mail interface

9. Sending email via Lotus Notes

10. Pull Email form Lotus Notes Server

11. email to Lotus Notes - Recommendations

12. Sending Email with Lotus Notes

 

 
Powered by phpBB® Forum Software