SendApproverForm Subroutine

After CopyToApprover has copied fields onto the new ToApprover message, the SendApproverForm subroutine uses CDO to add the e-mail address of the designated critique approver, as a recipient in the To: field, to the Recipients collection object in the message being created in the Outbox.

msgResponse.Recipients.AddMultiple ApproverEmail,cdoTo

The ApproverEmail parameter contains the e-mail address of the approver, and cdoTo means that this address goes on the To: line, not Cc: or Bcc:.

Then, if this addition caused no error, SendApproverForm calls the Resolve method of the CDO Recipients collection object, which traverses the Recipients collection to resolve each recipient's address information into a complete messaging address. In the following method call, the one parameter (whose value is set to False) means not to display a dialog box, if necessary, to prompt the user to resolve ambiguous names.

msgResponse.Recipients.Resolve(False)

In the case of CML/LitCrit, this method resolves one address, that of the administrator specified in the AppSettings page of the CML application. In the future, if multiple approvers' e-mail names are specified, they too could be resolved in this subroutine.

Finally, if the approver's name resolves, the message is sent to the approver using the Send method of the CDO Message object.

If msgResponse.Recipients.Resolved = True Then
   msgResponse.Send

The ToApprover form contains buttons that let the approver approve or reject the newly posted critique with a single click. For more about the design of this process, see Approving or Rejecting a Critique.

Note: About DebugReport  All of the supporting functions in LitCrit_Agent.asp call the DebugReport subroutine. For more information about DebugReport, see About the DebugReport Subroutine.