Auto Reply agent for mail-in db

I need to create an auto reply message for a mail-in db. I searched the forum and found this code, but it is looking for an operator or semi-colon at the end of “Initialize”…tried the semi-colon - no luck. Can you advise? Basically, customers will be submitting pictures for consideration in an ad campaign and we just want a reply that acknowledhes their submission. Thanks in advance !!!

Sub Initialize

Dim session As New notessession

Set db=session.currentdatabase

Set col=db.unprocesseddocuments

Set doc=col.getfirstdocument

While Not doc Is Nothing

Set replydoc=db.createdocument

replydoc.Subject=“Auto Reply”

replydoc.Body=“Thank you for your message!”

replydoc.SendTo=doc.From(0)

replydoc.Send False

Set doc=col.getnextdocument(doc)

Wend

End Sub

Subject: Auto Reply agent for mail-in db

I have used this code to create my own auto responder and it worked great for me. Should be easy for you to change to meet your needs.

http://www.dominoguru.com/dominoguru/home.nsf/da894e2903e8a4eb85256c1600778960/43ae2c01b5f9545d85256c75005a37d4!OpenDocument

Subject: RE: Auto Reply agent for mail-in db

Thanks Larence & Kelly !!!A new wrinkle in this …this morning the Marketing people gave me the text for the auto reply…and a pdf attachment !!! Is it possible to include an attachment on an auto reply? Didn’t look like it to me…BTW the Simple Action worked fine - I’m just a tad impatient.

Subject: RE: Auto Reply agent for mail-in db

Would you be able to put a link in the email for the user to click and open, print out and then fax?

This would probably be a better method because it would be a smaller email and there would be no attachment.

Subject: RE: Auto Reply agent for mail-in db

Kelly,I realize this post was a while back, but the link you posted is no longer valid, and I’m trying to accomplish the same thing. If you have an example of the method described in the link, or an updated like, I’d greatly appreciate it.

Thanks

Subject: Auto Reply agent for mail-in db

Try thishttp://www.automatedlogic.com/domblog.nsf/dx/DominoTeamMailbox

Subject: Simple Action

You can use the agent’s Simple Action to reply to the sender.

Subject: RE: Simple Action

Tried that but no response comes back…

Subject: RE: Simple Action

I assume that you set the trigger to “after new mail has arrived”. Did you try to figure out why the agent didn’t run? Are permissions set correctly to run the agent? Did you check the log?