Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext

RE: Help - Agent - LotusScript to send mail from Server
Rubens Sayegh 23.Oct.07 07:32 AM a Web browser
Domino Designer All Releases Windows XP


I'm still getting some errors I cannot find...

If I test the agent, it works fine, but when I leave it to the server to run, I get this message:

23/10/2007 03:00:22 AMgr: Agent ('AnivHOJE-Envio' in 'rh001.nsf') error message: No recipient list for Send operation

Just for testing purposes, I added a form named "Memo" to this database, with two fields: BlindCopyTo (names, multi-value) and Body (RichText). But still havenīt the chance to test it.

But I donīt believe this is necessary. For some reason the routine is not entering the recipientīs names in the BlindCopyTo field.

I also changed the sending routine to, instead of creating an array with "n" recipientīs names (it might overflow), I decided to send one message each time a valid address is found.

The first loop captures data to populate the Body field. This is working fine...

The second loop checks if is there any recipients to send the message... Hereīs the problem...

The view "AnivHOJE-Envio" (used in the 2nd loop), has 4 columns:
1) Real name of user
2) Office location
3) E-Mail address #1 (necessary)
4) E-Mail address #2 (optional)

So, I check if column 1 is valid --> entry.ColumnValues(0)
Then capture E-Mail Address 1 --> entry.ColumnValues(2)
Send Mail
Check is is there any E-Mail Address 2 --> entry.ColumnValues(2)
If valid, send another Mail
And so on...

Where did I go wrong?

Hereīs the entire code...

Sub Initialize

Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase

Dim view As NotesView
Set view = db.GetView( "AnivHOJE" )
Dim nav As NotesViewNavigator
Set nav = view.CreateViewNav

Dim entry As NotesViewEntry
Set entry = nav.GetFirst

Dim Xporte As String
Xporte=""

Dim Aniversariantes As String
Aniversariantes = ""

Dim DataPlan As String
DataPlan = Right$(Str(Day(Date)+100),2)+"/"+Right$(Str(Month(Date)+100),2)+"/"+Right$(Str(Year(Date)+100000),4)
Aniversariantes = "Estes são os Aniversariantes do Poupatempo, para o dia "+DataPlan+":"
While Not ( entry Is Nothing )
If entry.IsCategory Then
Aniversariantes = Aniversariantes + Chr$(13) + Chr$(13)+ "--- "+entry.ColumnValues(0)+" --------------------"
Else
Xporte = entry.ColumnValues(1)
If Xporte="" Then
Aniversariantes = Aniversariantes
Else
Aniversariantes = Aniversariantes + Chr$(13) + " " + entry.ColumnValues(1) + " (" + entry.ColumnValues(2)+") " + entry.ColumnValues(3) + " - " + entry.ColumnValues(4)
End If
End If
Set entry = nav.GetNext( entry )
Wend


Dim doc As NotesDocument
Set doc = New NotesDocument(db)
doc.Form = "Memo"
doc.Subject = "Poupatempo - Aniversariantes do dia "+DataPlan
doc.Body = Aniversariantes
Xporte=""


Set view = db.GetView( "AnivHOJE-Envio" )
Set nav = view.CreateViewNav
Set entry = nav.GetFirst
Dim i As Integer
i = 1

While Not ( entry Is Nothing )
Xporte = entry.ColumnValues(0)
If Xporte<>"" Then
doc.BlindCopyTo = entry.ColumnValues(2)
Call doc.Send( False)
Xporte = entry.ColumnValues(3)
If Xporte<>"" Then
i=i+1
doc.BlindCopyTo = entry.ColumnValues(3)
Call doc.Send( False)
End If
End If
i = i+1
Set entry = nav.GetNext( entry )
Wend
End Sub

Thanks in advance,
Rubens




Help - Agent - LotusScript to send ... (Rubens Sayegh 19.Oct.07)
. . RE: Help - Agent - LotusScript to s... (Cesar Mugnatto 19.Oct.07)
. . . . RE: Help - Agent - LotusScript to s... (j d adamsjr 19.Oct.07)
. . . . . . RE: Help - Agent - LotusScript to s... (Rubens Sayegh 21.Oct.07)
. . . . . . RE: Help - Agent - LotusScript to s... (Rubens Sayegh 21.Oct.07)
. . . . RE: Help - Agent - LotusScript to s... (Rubens Sayegh 21.Oct.07)
. . RE: Help - Agent - LotusScript to s... (Rami Jundi 19.Oct.07)
. . RE: Help - Agent - LotusScript to s... (Rubens Sayegh 23.Oct.07)
. . . . RE: Help - Agent - LotusScript to s... (Cesar Mugnatto 23.Oct.07)
. . . . . . RE: Help - Agent - LotusScript to s... (Rubens Sayegh 24.Oct.07)
. . . . . . . . RE: Help - Agent - LotusScript to s... (Cesar Mugnatto 24.Oct.07)
. . GOT IT!!! - Help - Agent - LotusScr... (Rubens Sayegh 26.Oct.07)
. . . . Ainda bem eom> (Cesar Mugnatto 26.Oct.07)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite