Manage Learn to apply best practices and optimize your operations.

True Domino Blooper #17: Help wanted

This Domino architect got in a spot of trouble when the auto-responder agent he created worked a little too well.

This Domino architect got in a spot of trouble when the auto-responder agent he created worked a little too well. Read more to find out what happened when the head honcho ordered our hero to get a handle on his pesky agent.


My first week at my current employer, I was asked to create an "auto-responder" for our "careers" e-mail account.

The idea was to reply to any e-mail messages that were sent to this account with a "Thank you for your interest" message. I created an agent called "OppAutoReply" and set it to trigger "before new mail arrives" with the following code:

 

 Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim smtp2 As NotesDocument Set db = session.CurrentDatabase Set doc = New NotesDocument( db ) Set smtp2 = session.DocumentContext Ifrom = smtp2.from(0) doc.Form = "Memo" doc.INetFrom = "opportunity@domain.com" doc.SendTo = smtp2.from(0) doc.Subject = "COMPANY NAME - Resume Received" Set body = New NotesRichTextItem(doc, "Body" ) Call body.AppendText("Thank you for your interest in pursuing employment opportunities etc...") Call body.addnewline(3) Call body.AppendText("Regards,") Call body.addnewline(2) Call body.AppendText("COMPANY Recruitment Team") Call doc.Send( False ) End Sub

Now this worked perfectly...until I get a call from the president of the company. He was wondering why I was sending him an e-mail message regarding his resume.

Apparently, the recruiter was scheduling meetings from this account (as to not "block out" his time). When a hiring manager would accept/decline the meeting, he would get the auto-response.

So, red-faced, I added an If statement to only reply to e-mails that contained an @ in the From field.

OH BUT WE'RE NOT DONE YET! Two weeks later I get a call from the recruiter that the mail database had about 700 e-mail messages in it and adds 20 more every time he hits refresh.

Apparently a job posting Web site sent an e-mail message with a bad ReplyTo address. My agent sent the auto-response; the response generated a nondel; the nondel generated an auto-response and so on and so on!

So I set the ReplyTo to "postmaster," and it's been working without a hitch for a few months now. However, I still hear about it from the president of the company every once in a while, asking me when he can sit down for that interview!

In case anyone's interested, here's the finished agent:

 

 Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim smtp2 As NotesDocument Set db = session.CurrentDatabase Set doc = New NotesDocument( db ) Set smtp2 = session.DocumentContext Ifrom = smtp2.from(0) If Instr(Ifrom,"@") Then doc.Form = "Memo" doc.INetFrom = "opportunity@domain.com" doc.ReplyTo = "postmaster@domain.com" doc.SendTo = smtp2.from(0) doc.Subject = "COMPANY NAME - Resume Received" Set body = New NotesRichTextItem(doc, "Body" ) Call body.AppendText("Thank you for your interest in pursuing employment etc.. ") Call body.addnewline(3) Call body.AppendText("Regards,") Call body.addnewline(2) Call body.AppendText("COMPANY Recruitment Team") Call doc.Send( False ) End If End Sub

-- Christopher Toohey

 


Do you have your own blooper? Send it in and claim your fame.

 Every story in our bloopers series comes to us directly from a SearchDomino.com administrator, developer or consultant. For obvious reasons, some contributors choose to remain anonymous.

MORE ON THIS TOPIC:

Read all SearchDomino.com's true bloopers.
View our Best Web Links on Domino/Notes administration.

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close