Cannot send document to mail database through lotusscript

Hi

I am trying to send an email (in lotusscript) to a mail database.

here is the part of the code where the memo is send:

docsend.SendTo = “mailIN_Prod”

call docsend.Send(False)

I keep getting the error message “Could not send document”.

I tried several names ( abbreviated, hierarchical, common). All names are listed in the public addressbook on the same server as the application. But all names returns the error message.

But if I run the code manually the memo is send but if I schedule the agent ( automatically) I always receive the error.

How can I solve this?

Regards

Subject: Cannot send document to mail database through lotusscript

When you send the document manually from the client the mailserver is set from you current Location document. When it is sent from the server obviously there is no location document so the agent looks in the Notes.ini for where the mailserver is located. If none is specified it fails. What you need is an entry in your Notes.ini on the server like this:

MailServer=CN=YourServerName/O=YourOrganiztionName

Now the agent knows where to find the server. This is required even if you only have a single server.

Add the line and it should work fine.

Subject: RE: Cannot send document to mail database through lotusscript

Hi

Thank you for the tip. Unfortunately I am at home and have to wait till tomorrow at work to di this. But what if there are more mailservers in the domain. Must all mailservers be set in the server ini?

Regards

Subject: RE: Cannot send document to mail database through lotusscript

Hi

The reason why I got the error “Document could not be send” was caused because the ECL setting to send mail was not enabled. After enabling I dont get that error anymore. Instead I now receive the error “File does not exist” while trying to send an email in Lotusscript.

I have checked the server notes.ini like you said. The mailserver setting is in the notes.ini. So that cant be the problem.

What else can I check to find out why I get the error “File does not exist” while sending email in an automated Lotusscript?

regards

Subject: RE: Cannot send document to mail database through lotusscript

Put some print statements in your agent that sends the emails so you can tell what line of script is causing the problem. The file does not exist error will generally indicate that a database was not opened so a read or save could not be performed.

Subject: RE: Cannot send document to mail database through lotusscript

Hi

The error occurs at the line

doc.Send(False)

Regards