Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forward email from sender to multiple recp.

Status
Not open for further replies.

ChrisBeach

Programmer
Jun 10, 2005
128
CA
Hey All,

I was wondering if there was a way to send an email from a specific sender to multiple recipients in domino. I know the user recieving the email can have a mail rule to forward it, but the user has deleted the rule several times by accident, I need a more sure way of doing this.

Anyone have any ideas?

Thanks!
 
A scheduled agent will do the trick. Do you know LotusScript ? Do you have a Designer client installed ? Do you have at least Design access to the user's mail database ?

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
I don't know LotusScript, but I have full access to the mail database.

Would it be a simpler script.. something I could just work through?

Thanks
 
No it won't be a Simple Agent, it'll be LotusScript and if you have no experience with it, you might want to transfer your request to the company developer.

I could give you code to work with, but you'd have to know how it works and how to modify it to your specific case, and I wouldn't want you to do that on your own since LotusScript is quite powerful and the risk of breaking one's mail is not an enjoyable experience.

Do you have a programmer you can talk to on site ?

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
The only one with any LotusScript experience left earlier this year.

If you could give me some code to work with I'm sure after some messing around I could get something, we have a replica server incase I were to break my mail database, and on top of that I have backups for all mail databases going back 32 days.

I do have a programming background, so all hope isn't lost ;)

Thanks!
 
Okay, I don't have time now, but I'll get some code posted here tomorrow.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Thanks a lot, I really appreciate it.

Have a good day
 
Here is something you could start working with :

Code:
Dim session As New notessession
Dim db As notesdabase
Dim coll As notesdocumentcollection
Dim doc As notesdocument
Dim olddoc As notesdocument
Dim fmemo As NotesDocument
Dim mailbody As NotesRichTextItem
Dim mailbodyf As NotesRichTextItem

Set db = session.CurrentDatabase
Set coll = db.unprocessed
If coll.count>0 Then
	Set doc = coll.GetFirstDocument
	Do While Not(doc Is Nothing)
		Set fmemo = db.createdocument
		fmemo.form="Memo"
		fmemo.subject="Forwarded automatically"
		Set mailbody = New Notesrichtextitem(fmemo,"body")
		Call doc.rendertortitem(mailbody)
		fmemo.sendto = recipientlist
		Call fmemo.Send
		Delete fmemo
		Set olddoc = doc
		Set doc = coll.GetNextDocument(olddoc)
		Delete olddoc
	Loop
End If
This code makes a collection of unprocessed docs in the current database - by setting the agent to run when mail arrives, the unprocessed will be only the new mail.

With the collection, the code blindly goes and creates a forward for every document that it contains. You will probably want to control that a bit further by implementing control of origin before forwarding.

Otherwise, this is not a bad framework to start with, I think.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Thank you very much! I'll give it a try and let you know how I make out in the next few days.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top