Skip to content
This repository has been archived by the owner on Feb 11, 2018. It is now read-only.

Commit

Permalink
Fixed indents.
Browse files Browse the repository at this point in the history
  • Loading branch information
tacker committed Oct 5, 2010
1 parent 8cfbb1d commit 5baeae6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions roundcube-webmail-fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@
if(!is_resource($sendmail)) throw new Exception('Could not open sendmail process.');
fwrite($pipes[0], $data);
fclose($pipes[0]);
$info = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$error = stream_get_contents($pipes[2]);
fclose($pipes[2]);
$returnValue = proc_close($sendmail);
if ($returnValue !== 0) throw new Exception('Sendmail failed with: ' . $info . ' / ' . $error);
$info = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$error = stream_get_contents($pipes[2]);
fclose($pipes[2]);
$returnValue = proc_close($sendmail);
if ($returnValue !== 0) throw new Exception('Sendmail failed with: ' . $info . ' / ' . $error);

// Mark mail as read
curl_setopt($curl, CURLOPT_URL, $baseUrl . '?_task=mail&_action=mark');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-RoundCube-Request: ' . $requestToken));
// Mark mail as read
curl_setopt($curl, CURLOPT_URL, $baseUrl . '?_task=mail&_action=mark');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-RoundCube-Request: ' . $requestToken));
curl_setopt($curl, CURLOPT_POSTFIELDS, array('_flag' => 'read', '_remote' => '1', '_uid' => $uid));
$data = curl_exec($curl);
if (curl_getinfo($curl, CURLINFO_HTTP_CODE) !== 200) throw new Exception('Failed to mark mail as read.');
Expand Down

0 comments on commit 5baeae6

Please sign in to comment.