This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Exchange.WebServices.Data; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.IO; | |
using System.Linq; | |
public class ExchangeRepository | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ExchangeRepository() | |
{ | |
serviceInstance = new ExchangeService(ExchangeVersion.Exchange2007_SP1); | |
//Provide the account user credentials | |
serviceInstance.Credentials = new WebCredentials(ConfigurationManager.AppSettings["User"].ToString(), | |
ConfigurationManager.AppSettings["Password"].ToString(), | |
ConfigurationManager.AppSettings["Domain"].ToString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = serviceInstance.FindItems( | |
//Find Mails from Inbox of the given Mailbox | |
new FolderId(WellKnownFolderName.Inbox, new Mailbox(ConfigurationManager.AppSettings["MailBox"].ToString())), | |
//Filter criterion | |
new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter[] { | |
new SearchFilter.ContainsSubstring(ItemSchema.Subject, ConfigurationManager.AppSettings["ValidEmailIdentifier"].ToString()), | |
new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false) | |
}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (EmailMessage msg in items) | |
{ | |
//Retrieve Additional data for Email | |
EmailMessage message = EmailMessage.Bind(serviceInstance, | |
(EmailMessage.Bind(serviceInstance, msg.Id)).Id, | |
new PropertySet(BasePropertySet.FirstClassProperties, | |
new ExtendedPropertyDefinition(0x1013, MapiPropertyType.Binary))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TempMail | |
{ | |
public string Subject { get; set; } | |
public string Body { get; set; } | |
public List<string> Recipients { get; set; } | |
public bool IsSummary { get; set; } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SendMail() | |
{ | |
SmtpClient client = new SmtpClient(ConfigurationManager.AppSettings["SMTPAddress"].ToString()); | |
client.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["User"].ToString(), | |
ConfigurationManager.AppSettings["Password"].ToString(), | |
ConfigurationManager.AppSettings["Domain"].ToString()); | |
Recipients.Insert(0, (ConfigurationManager.AppSettings["IntimationEmailId"].ToString())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AadPicker(tenant, token, selectedItem) { | |
var pairedObjectId, pairedEmailId; | |
var pairedObjectIdId = selectedItem.data("idpairing"); | |
if (pairedObjectIdId) { | |
pairedObjectId = $("#" + pairedObjectIdId); | |
} | |
var pairedEmailIdId = selectedItem.data("emailpairing"); | |
if (pairedEmailIdId) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using PeoplePickerAppWeb.Models | |
@model Person | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
@using (Html.BeginForm()) | |
{ | |
<div class="panel-group"> | |
<div class="panel panel-default"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AadPicker(tenant, token, selectedItem) { | |
var pairedObjectId, pairedEmailId; | |
var pairedObjectIdId = selectedItem.data("idpairing"); | |
if (pairedObjectIdId) { | |
pairedObjectId = $("#" + pairedObjectIdId); | |
} | |
var pairedEmailIdId = selectedItem.data("emailpairing"); | |
if (pairedEmailIdId) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace PeoplePickerAppWeb.Models.Repository | |
{ |
OlderNewer