Mark an email as read by setting the "read" field to true

@param  int  $id    The "email_messages" table's ID field
@return void
960181
public function markEmailAsRead($id) {

        $emailMessage = $this->model->find($id);

        $emailMessage->read = 1;

        return $emailMessage->save();
    }
75508
public function setMimeHeader($id, $text)
    {
        $this->_data[Horde_Imap_Client::FETCH_MIMEHEADER][$id] = $this->_setMixed($text);
    }
541800
public function smtpGetEmailInfoById($id)
    {
        if (empty($id)) {
            return $this->handleError('Empty id');
        }

        $requestResult = $this->sendRequest('/smtp/emails/' . $id);

        return $this->handleResult($requestResult);
    }
1011548
public function read($id)
    {
        $found = false;

        try {
            $this->data['entry'] = $entry = $this->collection->findOne($id);
        } catch (Exception $e) {
            // noop
        }

        if (isset($entry)) {
            $found = true;
        }

        if (! $found) {
            return $this->app->notFound();
        }
    }
136269
public function sendMessageRead($to, $id)
    {
        $listNode = null;
        $idNode = $id;
        if (is_array($id) && count($id > 1)) {
            $idNode = array_shift($id);
            foreach ($id as $itemId) {
                $items[] = new ProtocolNode('item',
                [
                  'id' => $itemId,
                ], null, null);
            }
            $listNode = new ProtocolNode('list', null, $items, null);
        }

        $messageNode = new ProtocolNode('receipt',
        [
          'type' => 'read',
          't'    => time(),
          'to'   => $this->getJID($to),
          'id'   => $idNode,
        ], [$listNode], null);

        $this->sendNode($messageNode);
    }
1335634
protected function setEncoding($id)
    {
        $header = imap_fetchstructure($this->imap, $id);
        $params = $header->parameters ?: [];

            foreach ($params as $k => $v) {
                if (stristr($v->attribute, 'charset')) {
                    return $v->value;
                }
            }

        return 'utf-8';
    }
1346772
public function setRelatedId( $id )
	{
		if ( $id === $this->getRelatedId() ) { return; }
		$id = (int) $id;
		$this->_values['relatedid'] = $id;
		$this->setModified();
	}
1367995
public function markReadThread($id, $unread = true, $read = true)
	{
		// Build the request path.
		$path = '/notifications/threads/' . $id;

		$data = array(
			'unread' => $unread,
			'read'   => $read,
		);

		return $this->processResponse(
			$this->client->patch($this->fetchUrl($path), json_encode($data)),
			205
		);
	}
250629
public function markThreadAsRead(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/notifications/threads/:id', (string)$id),
            Request::METHOD_PATCH);
    }
1361705
public function setMessageId($id = true)
    {
        if ($id === null || $id === false) {
            return $this;
        } elseif ($id === true) {
            $id = $this->createMessageId();
        }

        if ($this->_messageId === null) {
            $id = $this->_filterOther($id);
            $this->_messageId = $id;
            $this->_storeHeader('Message-Id', '<' . $this->_messageId . '>');
        } else {
            /**
             * @see Zend_Mail_Exception
             */
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('Message-ID set twice');
        }

        return $this;
    }
545537
public function setVisible(int $id): void
    {
        $this->logger->logCall(__METHOD__, ['location' => $id]);
        $this->persistenceHandler->locationHandler()->setVisible($id);

        $this->cache->invalidateTags(['location-path-data-' . $id]);
    }
434570
public function add($id, $msg) {
        if (isset($this->errors[$id]) && !is_array($this->errors[$id]))
            $this->errors[$id] = array($msg);
        else
            $this->errors[$id][] = $msg;
    }
928696
private function checkMessageId($id)
    {
        if(!is_int($id)){
            throw new ImapClientException('$id must be an integer!');
        };
        if($id <= 0){
            throw new ImapClientException('$id must be greater then 0!');
        };
        if($id > $this->countMessages()){
            throw new ImapClientException('$id does not exist');
        }
    }
1090857
public function set_text(string $id, string $text): bool
  {
    if ( \bbn\str::is_uid($id) && $this->pref->set_text($id, $text) ){
      $this->delete_cache($id);
      return true;
    }
    return false;
  }
1204170
public function editAction($id)
    {
        $this->initializeScaffolding();

        $this->beforeRead();
        $this->view->record = $this->scaffolding->doRead($id);
        $this->afterRead();

        $this->beforeEdit();
        $this->view->form =  $this->scaffolding->getForm($this->view->record);
        $this->afterEdit();
    }
857140
public function read($id)
    {
        // clean expired tokens first
        $this->_cleanExpired();

        // clean id
        $id = preg_replace('/^([a-f0-9]{8}).*/', '$1', $id);

        // Get token for this id
        return $this->findById($id)->first();
    }
554102
public function actionPreview($id)
    {
        $emailSpool = $this->loadModel($id);
        echo CHtml::tag('div', array('style' => 'font-family: Arial; font-weight: bold;'), $emailSpool->subject) . '<hr/>';
        echo $emailSpool->swiftMessage->getBody();
    }