Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lotus notes - forward mails agent with these conditions in subject,

Posted on 2015-02-11
3
Medium Priority
?
274 Views
Last Modified: 2015-02-11
Hi guys,

I urgently need some help, with a lotus agent/script that can forward mails from the inbox to a mailadress/mailgroup if it contains 2 specific word in the subject.

The user have restrictions to create the mail rule "send copy to" so sadly that's a option we do not have. The user are allowed to create agents in their mailbox

kindly advise.
0
Comment
Question by:Hakum
[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
  • 2
3 Comments
 
LVL 1

Author Comment

by:Hakum
ID: 40602818
I found this code,

but i'm not sure how I add if it contains "AAAA" and "BBBB"

Sub Initialize
	Dim s As New NotesSession 
	Dim db As NotesDatabase 
	Dim doc As NotesDocument 
	Dim newdoc As NotesDocument 

	Set db=s.CurrentDatabase 
	Set doc=s.Documentcontext 
	Set newdoc = db.CreateDocument 

	Call doc.CopyAllItems(newdoc, True) 
newdoc.Subject="Fwd: "& newdoc.Subject(0) 
	newdoc.CopyTo="" 
	newdoc.BlindCopyTo="" 
	Call newdoc.Send(False, "XXXX@XXXX.com")
End Sub

Open in new window

0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 2000 total points
ID: 40602883
Should be something like this:

Sub Initialize
	Dim s As New NotesSession 
	Dim db As NotesDatabase 
	Dim doc As NotesDocument 
	Dim newdoc As NotesDocument 

	Set db=s.CurrentDatabase 
	Set doc=s.Documentcontext 

	If Not(Instr(doc.Subject(0), "AAAA")>0 And Instr(doc.Subject(0), "BBBB")>0) Then
		Exit Sub
	End If

	Set newdoc = db.CreateDocument 

	Call doc.CopyAllItems(newdoc, True) 
	newdoc.Subject="Fwd: "& newdoc.Subject(0) 
	newdoc.CopyTo="" 
	newdoc.BlindCopyTo="" 
	Call newdoc.Send(False, "XXXX@XXXX.com")
End Sub

Open in new window

0
 
LVL 1

Author Closing Comment

by:Hakum
ID: 40602916
works like a charm thank you sooo much!!!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

719 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