public function message($recipients, $subject, $body, $copy_self = FALSE) {
    /**
     * Clean up the passed data per these rules:
     * 
     * 1) Message must be sent to at least one recipient
     * 2) No HTML permitted
     */
    if(!empty($subject) && is_string($subject)) {
      $subject = trim(strip_tags(stripslashes($subject)));
    } else {
      throw new LinkedInException('LinkedIn->message(): bad data passed, $subject must be of type string.');
    }
    if(!empty($body) && is_string($body)) {
      $body = trim(strip_tags(stripslashes($body)));
    } else {
      throw new LinkedInException('LinkedIn->message(): bad data passed, $body must be of type string.');
    }
    if(!is_array($recipients) || count($recipients) < 1) {
      // no recipients, and/or bad data
      throw new LinkedInException('LinkedIn->message(): at least one message recipient required.');
    }
    
    // construct the xml data
		$data   = '<?xml version="1.0" encoding="UTF-8"?>
		           <mailbox-item>
		             <recipients>';
    $data  .=     ($copy_self) ? '<recipient><person path="/people/~"/></recipient>' : '';
                  for($i = 0; $i < count($recipients); $i++) {
                    if(is_string($recipients[$i])) {
                      $data .= '<recipient><person path="/people/' . trim($recipients[$i]) . '"/></recipient>';
                    } else {
                      throw new LinkedInException ('LinkedIn->message(): bad data passed, $recipients must be an array of type string.');
                    }
                  }
    $data  .= '  </recipients>
                 <subject>' . htmlspecialchars($subject) . '</subject>
                 <body>' . htmlspecialchars($body) . '</body>
               </mailbox-item>';
    
    // send request
    $query    = self::_URL_API . '/v1/people/~/mailbox';
    $response = $this->fetch('POST', $query, $data);
		
		/**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(201, $response);
	}
public function message($recipients, $subject, $body, $copy_self = FALSE) {
    /**
     * Clean up the passed data per these rules:
     * 
     * 1) Message must be sent to at least one recipient
     * 2) No HTML permitted
     */
    if(!empty($subject) && is_string($subject)) {
      $subject = trim(strip_tags(stripslashes($subject)));
    } else {
      throw new LinkedInException('LinkedIn->message(): bad data passed, $subject must be of type string.');
    }
    if(!empty($body) && is_string($body)) {
      $body = trim(strip_tags(stripslashes($body)));
    } else {
      throw new LinkedInException('LinkedIn->message(): bad data passed, $body must be of type string.');
    }
    if(!is_array($recipients) || count($recipients) < 1) {
      // no recipients, and/or bad data
      throw new LinkedInException('LinkedIn->message(): at least one message recipient required.');
    }
    
    // construct the xml data
		$data   = '<?xml version="1.0" encoding="UTF-8"?>
		           <mailbox-item>
		             <recipients>';
    $data  .=     ($copy_self) ? '<recipient><person path="/people/~"/></recipient>' : '';
                  for($i = 0; $i < count($recipients); $i++) {
                    if(is_string($recipients[$i])) {
                      $data .= '<recipient><person path="/people/' . trim($recipients[$i]) . '"/></recipient>';
                    } else {
                      throw new LinkedInException ('LinkedIn->message(): bad data passed, $recipients must be an array of type string.');
                    }
                  }
    $data  .= '  </recipients>
                 <subject>' . htmlspecialchars($subject) . '</subject>
                 <body>' . htmlspecialchars($body) . '</body>
               </mailbox-item>';
    
    // send request
    $query    = self::_URL_API . '/v1/people/~/mailbox';
    $response = $this->fetch('POST', $query, $data);
		
		/**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(201, $response);
	}
public function message ( $ recipients , $ subject , $ body , $ copy_self = FALSE ) { /**
     * Clean up the passed data per these rules:
     * 
     * 1) Message must be sent to at least one recipient
     * 2) No HTML permitted
     */ if ( ! empty ( $ subject ) && is_string ( $ subject ) ) { $ subject = trim ( strip_tags ( stripslashes ( $ subject ) ) ) ; } else { throw new LinkedInException ( 'LinkedIn->message(): bad data passed, $subject must be of type string.' ) ; } if ( ! empty ( $ body ) && is_string ( $ body ) ) { $ body = trim ( strip_tags ( stripslashes ( $ body ) ) ) ; } else { throw new LinkedInException ( 'LinkedIn->message(): bad data passed, $body must be of type string.' ) ; } if ( ! is_array ( $ recipients ) || count ( $ recipients ) < 1 ) { // no recipients, and/or bad data throw new LinkedInException ( 'LinkedIn->message(): at least one message recipient required.' ) ; } // construct the xml data $ data = '<?xml version="1.0" encoding="UTF-8"?>
		           <mailbox-item>
		             <recipients>' ; $ data .= ( $ copy_self ) ? '<recipient><person path="/people/~"/></recipient>' : '' ; for ( $ i = 0 ; $ i < count ( $ recipients ) ; $ i ++ ) { if ( is_string ( $ recipients [ $ i ] ) ) { $ data .= '<recipient><person path="/people/' . trim ( $ recipients [ $ i ] ) . '"/></recipient>' ; } else { throw new LinkedInException ( 'LinkedIn->message(): bad data passed, $recipients must be an array of type string.' ) ; } } $ data .= '  </recipients>
                 <subject>' . htmlspecialchars ( $ subject ) . '</subject>
                 <body>' . htmlspecialchars ( $ body ) . '</body>
               </mailbox-item>' ; // send request $ query = self :: _URL_API . '/v1/people/~/mailbox' ; $ response = $ this -> fetch ( 'POST' , $ query , $ data ) ; /**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ return $ this -> checkResponse ( 201 , $ response ) ; }
Connection messaging method.

Send a message to your network connection(s), optionally copying yourself.
Full details from LinkedIn on this functionality can be found here:

http://developer.linkedin.com/docs/DOC-1044

@param arr $recipients
The connection(s) to send the message to.
@param str $subject
The subject of the message to send.
@param str $body
The body of the message to send.
@param bool $copy_self
[OPTIONAL] Also update the teathered Twitter account.

@return arr
Array containing retrieval success, LinkedIn response.
Connection messaging method .