copy_message NSSOAP Methods

The copy_message method creates a copy of a message, assigning ownership of the copied message to a specified fax server user. The functionality of forwarding a message in the Received queue from one user to another can be achieved by passing true for the delete_source_on_success parameter, in which case the source message will be deleted if it is successfully copied to the target user.

COPY_MESSAGE_RESULT copy_message(
  string user_name, // Fax server user name
  string user_password, // Fax server user password
  string source_message_handle, // Message to copy
  string target_user, // Target user for copied message 
  bool   delete_source_on_success // Delete source on success
)

Parameters:
user_name A NET SatisFAXtion user name.

user_password The password for the user.

source_message_handle The handle of the source message to copy. To obtain a message handle, call get_message_q and use the message_handle field of a Q_MESSAGE object, or use the message handle returned from send_message.

target_user The user who will assume ownership of the copied message.  To obtain a list of fax server users, call get_users and use the user_name field of a USER_INFO object.

delete_source_on_success A boolean that causes the source message to be deleted if the copy is successful.

Return Value:
A COPY_MESSAGE_RESULT object containing a result code and string, and a new message handle if the function was successful.

Example:
public void forward_message_to_new_user(string message_handle,
                                        string to_this_user)
  {
  NSSOAP ns = new NSSOAP();

  COPY_MESSAGE_RESULT cm =
    ns.copy_message("supervisor",
                    "",
                    message_handle,
                    to_this_user,
                    true);

  if (cm.status_num != STATUS_NUM.NoError)
    {
    MessageBox.Show(cm.status_string);
    }
  }

See Also:
send_message, get_message_q