Solved

Need to send an e-mail via an agent

Posted on 2003-10-21
12
195 Views
Last Modified: 2013-12-18
Hi experts,
 
I've an automated scheduled agent that runs daily at 5:00 pm which will basically send an e-mail to some team members asking them to click a button in a view.

I did this by using a 'simple action' in the agent.

Now whenever they get that e-mail they have to go to the database open the designed view and click the button which will basically export the view into a text file.

Now I just to include the link of the database in the e-mail which when clicked will directly open the desired view.
Please advise
thanks
Chakrika
0
Comment
Question by:chakrika
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
12 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9594049
You can do it using script only. No Simple Actions..Sorry !

Here is a sample script from help documentation

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set view = db.GetView( "Boots" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Call rtitem.AppendDocLink _
( view, view.Name & " in " & db.Title )
newDoc.Subject = "Here is a link to the Boots folder"
newDoc.SendTo = "SendTo Address"
Call newDoc.Send( False )

~Hemanth
0
 

Author Comment

by:chakrika
ID: 9594086
thanks I'll test it and let you know
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9594212
Sub Initialize

Const nameOfView = "name of some view"
Const recipientGroup = "some group to send message to - does not work with multiple names - ask if you need this"
Const Subject = "Subject of e-Mail"
Const Body = "Body text, above the link"

Dim s as new notesSession
Dim db as notesDatabase
Set db = s.currentDatabase
Dim view as notesView
Set view = db.getView(nameOfView)
If view is Nothing Then
  MsgBox "View not found - " & nameOfView
  Exit Sub
End If
Dim doc as New NotesDocument(db)
doc.Form = "Memo"
doc.SendTo = recipientGroup
doc.Subject = Subject
Dim body as New NotesRichTextItem(doc)
body.appendText Body
body.addNewLine 2
body.appendDocLink view , nameOfView
doc.Send false

End Sub
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:chakrika
ID: 9595633
I've multiple e-mail addresses i've to put. I guess i've to put multiple addresses in
'recipientGroup'.
Let me know how to do this.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9595685
The easiest way?  Create a group in teh Domino directory, name it something appropriate.  Add the recipient list to the new group.  Use the group's name in the script (recipientGroup assignment).  Voila, from the script's perspective, there is onl one address, but it really does go to the full list of users.
0
 

Author Comment

by:chakrika
ID: 9598412
I know, but to create a group in my company its a big process. I do not have access to create a group and its a big process to get it. Is there any other way to include it in the code above.
0
 

Author Comment

by:chakrika
ID: 9598723
Qwaletee, I used yours and I got a compile error at Dim body As New NotesRichTextItem(doc).

Hemanth, I used yours, it works great. however, I cannot put any body in it and how can I put more than one names in the Sendto.

Your adivse is required.
thanks
Sridevi
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9598791
Declare array of names and assign it to SendTo Field..

Dim sendArr(2) as string

sendArr(0) = "Chakrika/SomeOU"
sendArr(1) = "Qwaletee/SomeOU"
sendArr(2) = "Hemanth/SomeOU"

doc.SendTo = sendArr

0
 

Author Comment

by:chakrika
ID: 9598830
Hemanth, the body has only the link. Can I put some message in the body too
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 200 total points
ID: 9598908
Here is modified code for last two requirements of yours..

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim sendArr(2) as string
sendArr(0) = "Chakrika/SomeOU"
sendArr(1) = "Qwaletee/SomeOU"
sendArr(2) = "Hemanth/SomeOU"
Set db = session.CurrentDatabase
Set view = db.GetView( "Boots" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Call rtitem.AppendDocLink ( view, view.Name & " in " & db.Title )
Call rtitem.AddNewLine(2) ' Add lines to seperate link from text..
Call rtitem.AppendText( "Add text to the body")
newDoc.Subject = "Here is a link to the Boots folder"
newDoc.SendTo = sendArr
Call newDoc.Send( False )
0
 

Author Comment

by:chakrika
ID: 9599007
Thanks works great.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9604712
Hemanth,

I don't use OU's!  And where's the O?



:)
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question