Skip to main content
 
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 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

Agent not able to recognize mail address while sending mail
Parameshwar Y Rao 29.Jul.05 11:55 AM a Web browser
Domino Designer -- Agents 5.0.9a Windows XP

Hi, (the mail is long but the solution could be small)

I have the following code in an agent to send out mails when the phase dates have passed for a project. It has to send mails for each matching record in the record set which is filledup by a stored procedure.

The stored procedure is returning records and all the data into all the fields is coming properly. Everything is working fine except for one thing. When sending out the mail, the agent is not able to recognize the value in the line....

docmail.SendTo = LastModifiedBy

It is not able to match the name with a name in the address book and hence is just sending a mail to...

docmail.CopyTo = "Parameshwar Y Rao"

The stored procedure actually returns names as a string and if for the same project there is more than one resource, the stored procedure returns the value for myrs.fields(5).value as "PersonName1,PersonName2,PersonName3"

So I thought when we place such a string in the TO field and send mail to it, the mail will reach all the people. But this is not happenig.

Can someone tell me how do I acheive this.

Thanks for your time.

Regards,
Param


myConString = "DRIVER=SQL Server;SERVER=;DATABASE=;User ID=;Password="
Set myDBcon = createobject("ADODB.Connection")
Set myRS = createobject("ADODB.Recordset")
'mydbcon.ConnectionTimeout = 600

If mydbcon.state = adStateClosed Then mydbcon.open myConString

SQL = "exec proc1"

If myRS.state = adStateOpen Then myRS.Close

myRS.cursortype = adopenstatic
myrs.open sql, mydbcon

ProjectID = ""
ProjectName = ""
SubProjName = ""
PhaseName = ""
PhaseEndDt = ""
LastModifiedBy = ""

aLog.OpenAgentLog

While Not myRS.eof

ProjectID = myrs.fields(0).value
ProjectName = myrs.fields(1).value
SubProjName = myrs.fields(2).value
PhaseName = myrs.fields(3).value
PhaseEndDt = myrs.fields(4).value
LastModifiedBy = myrs.fields(5).value

docmail.Form = "Memo"
docmail.Principal="Main Mail ID"
docmail.Subject = "Phase Metrics for " & ProjectName & " exceded."
docmail.SendTo = LastModifiedBy
docmail.CopyTo = "Parameshwar Y Rao"

If Date >= Cdat(PhaseEndDt) Then
docmail.body = "Greetings, " & Chr$(10) & Chr$(10) & _
"Project Name:" & ProjectName & Chr$(10) & _
"SubProject Name:" & SubProjName & Chr$(10) & Chr$(10) & _
"This is a reminder that the '" & PhaseName & "' phase has ended for project number " & ProjectID & _
" on " & PhaseEndDt & " and the " & _
"next phase has not been activated. Either activate your next phase or adjust your phase dates. " & _
Chr$(10) & Chr$(10) & "Thank You."

Call docmail.Send(False)
End If
myRS.MoveNext
Wend

Exit Sub




Agent not able to recognize mail ad... (Parameshwar Y R... 29.Jul.05)
. . RE: Agent not able to recognize mai... (Gary Roberts 29.Jul.05)
. . . . RE: Agent not able to recognize mai... (Parameshwar Y R... 29.Jul.05)






  Document options
Print this pagePrint this page

 Search this forum

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

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

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

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
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
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow