Link to home
Start Free TrialLog in
Avatar of cjs2895
cjs2895

asked on

Setting Up E-Mail Autoresponder In Notes 5

Folks, I am a novice Lotus Notes user using version 5.0.5. I do not have access to the server, nor any manuals other then the client's on-line help. However I do have the ability to run agents in my Mail database.

I want to know how to create an agent that will respond to all new e-mails by sending a document to everyone addressed by the e-mail. I have created an stationary called "Test Stationary" that contains the information that I want to send out. I want to get the list of addresses from the new e-mail and put them into the BCC: field of the stationary, I want to take the subject of the new e-mail and put it into the stationary with a "Re: " prefix. I belive I set the option to "prevent forward/copy/print" in the stationary? And last I need to avoid mail loops i.e. if I send a message to myself, or if I send a message to someone else who has an autoresponder running -- I think Note solves this itself, but I'm not sure how the mechanism works.

I'm sure this is easy for anyone who knows Notes, but I'm being very specific about what I want, so I'm giving 500 points for the answer to my question.
Avatar of qwaletee
qwaletee

What about just using the Out Of Office agent?  It has most of the functionality you want!

To work with it, open your inbox, click the "Tools" button, and choose "Out of Office..."

Follow the prompts from there.

Here are the limitations:

1) You don't have much control over formatting

2) Each recipient should receive only ONE away notification, no matter how many time he or she sends you a message.

3) There is typically up to one hour of delay from the time someone sends you a message to the time the autoresponder replies.

If you really want to use your stationery, I would modify the Out of Office agent to send the message using your stationery.  You will need the Lotus Notes Designer to make this modification (the standard client can't edit LotusScript agents).

Open your inbox.  Choose VIEW -> AGENTS from the menu.

Highlight the Out of Office agent (it will have a checkbox next to it, ticked or not).  Alt-Enter to show properties, click the third tab, and check off "Prohibit design refresh or replace to modify."  Otherwise, the changes we make are likely to revert.

Double-click the agent to open it.  CLick the DECLARATIONS section.  Locate the line:           Me.m_rItem.AppendText ( Me.m_strMsg )

It is very close to the bottom -- maybe ten lines up.

Add the following below it:
Const statName = "***NAME OF YOUR STATIONERY EXACTLY AS APPEARS IN STATIONERY VIEW***"
Dim statView as notesView
set statView = Me.m_db.getView("Stationery")
Dim foundStat as integer
foundStat = false
Dim statDoc as notesDocument
set statDoc = statView.getFirstDocument
do while not (statDoc is nothing)
   if statDoc.MailStationeryName(0) = statName then exit do
   set statDoc = statView.getNextDocument(Me.m_noteEMail)
loop
if not (statDoc is nothing) then
   statDoc.ReplaceItemValue "SendTo", Me.m_strSendToName
   statDoc.replaceItemValue "Subject" , "Re: " + doc.subject(0)
   statDoc.ReplaceItemValue "$AutoForward", True
   set Me.m_noteEmail = statDoc
end if


I haven't tried this, but it should work
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cjs2895

ASKER

If the Out Of Office agent could send a formatted document it would indeed be ideal! For my immediate needs at least. If I can't get to a copy of the Lotus Notes Designer, is there any alternative way to achieve what I'm looking to do?
Avatar of SysExpert
Without Designer, you are limited to what is already available, or what someone else can prepare for you in Lotus Script.


I hope this helps !
Avatar of cjs2895

ASKER

Well drat! My employeer won't let me have Designer, so I don't have an immediate way to test this. They say by not allowing me to use Designer they are actually saving me from myself and that I should be greatful. Oh well, what can you do? I'm going to award the points to qwaletee. Good work!
CJS,

Ask your admin if he can add the lines to the agent for you.  Or, as a last resort, post a copy of your mail file somewhere (design only, please), and I can add the lines for you.

To create a design only copy, do as follows:
File -> Database -> New Copy
Change title to CJS Mail Design
Change file name to CJSMAIL.NTF
Select DATABASE DESIGN ONLY
Click OK

Zip it up, becasue it will be about 5MB even with just design.