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.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

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

Notes/Domino 6 and 7 Forum



PreviousPrevious NextNext

db sh 17.Sep.14 09:04 AM a Web browser
Applications Development All Releases All Platforms

Dear All,
I have created one agent for reminder, I have tested my code on three different servers, my code is working perfectly fine in 2 servers but at one server agent is running, updating the fields also but not getting any email through this agent although same agent code working on other server and getting email also.

My requirement is there is one creation date field, which is set when user creates document for ex 17.03.2014 user created document then after 6th month means 17-09-2014 reminder email will be sent and creation date field will updated by current date(means 17-09-2014 will set in creation date field) and again after 6th month means 17-03-2015 reminder email will go and so on.

Below is my code

Sub Initialize

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument

Dim ReminderDate As NotesDateTime
Dim CurrDate As NotesDateTime
Dim TempDoc As NotesDocument
Dim Email_Doc As NotesDocument
Dim nam As NotesName
Dim rtitem As NotesRichTextItem

Set db = session.Currentdatabase
Set view = db.Getview("Reminderemail")

Set doc = view.Getfirstdocument()

While Not doc Is Nothing
Set nam = session.CreateName(doc.Requestor(0)) 'Name of Requestor
Set TempDoc = view.Getnextdocument(doc)
Set ReminderDate = New NotesDateTime(doc.CreationDate(0))
Call ReminderDate.Adjustmonth(6)
Set CurrDate = New NotesDateTime(Today)

If Cdat(ReminderDate.Dateonly)=Cdat(CurrDate.Dateonly) Then
Set Email_Doc=db.CreateDocument
Email_Doc.Form = "Mail"
Email_Doc.Subject = "Reminder email"
Email_Doc.MailSent = "1"
Email_Doc.To = ""

ForAll obj In
Email_Doc.To_Comp=Email_Doc.To ''there is one field on form need to set
End ForAll

doc.ReminderFlag = "1" ''set reminder flag
doc.CreationDate=Cdat(Currdate.Dateonly) '' set creation date field again
Email_Doc.Saveoptions="1" ''need to set saveoptions field also
Call doc.Save(True,True)
Call Email_Doc.Send(True,"")

End If

Set doc = TempDoc


End Sub

Please suggest what can be the reason.

Thanks in advance

email not sending through schedule ... (db sh 17.Sep.14)
. . Suggestions (Barry Shapiro 17.Sep.14)
. . . . RE: Suggestions (db sh 18.Sep.14)
. . . . . . Look for an error in log.nsf when t... (Carl Tyler 18.Sep.14)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

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


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


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