Reply To: Insert Message from another application


Home Forums Front End PM PRO Insert Message from another application Reply To: Insert Message from another application

#6169
Craig Tucker
Participant

Yes, sender is always admin_user_login and it is the login user name for wordpress the recipient is always $args[‘user’] and it is the login user name for wordpress. The function they are sent to is,


function convertToID($login) {
  global $wpdb;
  $result = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->users} WHERE user_login = %s", $login));
  if (!empty($result)) return $result;
  return 0;
}

This is built for one attachment only.
The mimetype is already defined in $args['mimetype'] . Thanks for your patience with me on this.

Craig