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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
<head> | |
<link rel="stylesheet" href="http://www.stackprinter.com/stylesheets/export.css"/> | |
<style type="text/css"> | |
.comment { color: Gray; margin-bottom:4px; } | |
</style> | |
</head> | |
<body> | |
<div id="home"> |
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
isCorrectNtlm: function(file) | |
{ | |
var resp = file.responseHeadersText.match(/www-authenticate:\s(.+)/i)[1]; // file.responseHeaders is undefined here | |
return (resp && resp.search(/ntlm|negotiate/i) >= 0); | |
}, | |
isError: function(file) | |
{ | |
if (file.aborted) | |
return true; |
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 static IEnumerable<MessageDetails> Folder(ImapClient ic, string folderName) | |
{ | |
var selRes = ic.Select(folderName); | |
if (!selRes.IsOk) { | |
throw new InvalidOperationException(selRes.ReasonForFailure); | |
} | |
return ic.Messages.Where(x => x.Uid >= uidNext).Select(y => new MessageDetails { | |
From = y.From.FirstOrDefault().ToString(), | |
Uid = y.Uid, |
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
private static byte[] ConvertReportToExcel(List<Dictionary<string, object>> report) | |
{ | |
var file = new XLWorkbook(); | |
var sheet = file.Worksheets.Add("Report"); | |
if (report.Count() == 0) { | |
sheet.Cell("A1").SetValue("Report is empty"); | |
} else { | |
// First row filled with keys | |
var firstRow = report.ElementAt(0); | |
for (int j = 0; j < firstRow.Count; j++) { |
NewerOlder