Exemplo n.º 1
0
require 'outlook.php';
$loggedIn = !is_null($_SESSION['access_token']);
$redirectUri = 'http://shoretelcalenders.azurewebsites.net/authorize.php';
?>

<html>
	<head>
		<title>PHP Mail API Tutorial</title>
	</head>
  <body>
    <?php 
if (!$loggedIn) {
    ?>
      <!-- User not logged in, prompt for login -->
      <p>Please <a href="<?php 
    echo oAuthService::getLoginUrl($redirectUri);
    ?>
">sign in</a> with your Office 365 account.</p>
    <?php 
} else {
    $messages = OutlookService::getMessages($_SESSION['access_token']);
    ?>
      <!-- User is logged in, do something here -->
      <h2>Your messages</h2>
      <table>
        <tr>
          <th>From</th>
          <th>Subject</th>
          <th>Received</th>
        </tr>
        
Exemplo n.º 2
0
  require('oauth.php');
  require('outlook.php');

  $loggedIn = !is_null($_SESSION['access_token']);
?>

<html>
    <head>
      <title>PHP Mail API Tutorial</title>
    </head>
  <body>
    <?php
      if (!$loggedIn) {
    ?>
      <!-- User not logged in, prompt for login -->
      <p>Please <a href="<?php echo oAuthService::getLoginUrl('http://localhost/Producktiviti/OutBinder/authorize.php')?>">sign in</a> with your Office 365 account.</p>
    <?php
      }
      else {
        $messages = OutlookService::getMessages($_SESSION['access_token']);
    ?>
      <!-- User is logged in, do something here -->
      <h2>Your messages</h2>

      <table>
        <tr>
          <th>From</th>
          <th>Subject</th>
          <th>Received</th>
        </tr>