This commit is contained in:
@@ -259,21 +259,21 @@ namespace rockfishCore.Util
|
||||
{
|
||||
attachments = new List<fbAttachment>();
|
||||
}
|
||||
public bool noRecord;
|
||||
public string id;
|
||||
public string title;
|
||||
public string project;
|
||||
public int priority;
|
||||
public string notes;
|
||||
public long? created;
|
||||
public long? closed;
|
||||
public List<fbAttachment> attachments;
|
||||
public bool noRecord { get; set; }
|
||||
public string id { get; set; }
|
||||
public string title { get; set; }
|
||||
public string project { get; set; }
|
||||
public int priority { get; set; }
|
||||
public string notes { get; set; }
|
||||
public long? created { get; set; }
|
||||
public long? closed { get; set; }
|
||||
public List<fbAttachment> attachments { get; set; }
|
||||
}
|
||||
|
||||
public class fbAttachment
|
||||
{
|
||||
public string fileName;
|
||||
public byte[] blob;
|
||||
public string fileName { get; set; }
|
||||
public byte[] blob { get; set; }
|
||||
}
|
||||
|
||||
//eoc
|
||||
|
||||
@@ -21,13 +21,18 @@ namespace rockfishCore.Util
|
||||
private const string S3_HOST_ENDPOINT = "https://nyc3.digitaloceanspaces.com";
|
||||
private const string S3_BUCKET_NAME = "gztw1";
|
||||
|
||||
private static HttpClient Client = new HttpClient();
|
||||
private static readonly HttpClient _httpClient;
|
||||
|
||||
|
||||
static OpsDiagnostics()
|
||||
{
|
||||
_httpClient = new HttpClient();
|
||||
}
|
||||
|
||||
public static bool CheckWebsite(string url, string mustContain)
|
||||
{
|
||||
bool Result = false;
|
||||
var Response = Client.GetAsync(url).Result;
|
||||
var Response = _httpClient.GetAsync(url).Result;
|
||||
if (Response.IsSuccessStatusCode)
|
||||
{
|
||||
var PageText = Response.Content.ReadAsStringAsync().Result;
|
||||
@@ -73,9 +78,11 @@ namespace rockfishCore.Util
|
||||
}
|
||||
};
|
||||
|
||||
var httpClient = new HttpClient(httpClientHandler);
|
||||
await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));
|
||||
|
||||
using (var httpClient = new HttpClient(httpClientHandler))
|
||||
{
|
||||
await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));
|
||||
//httpClient.Dispose();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ namespace rockfishCore.Util
|
||||
|
||||
public class rfMailMessage
|
||||
{
|
||||
public MimeMessage message;
|
||||
public uint uid;
|
||||
public MimeMessage message { get; set; }
|
||||
public uint uid { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -119,8 +119,8 @@ namespace rockfishCore.Util
|
||||
bool trackDeliveryStatus = false, string CustomHeader = "", string CustomHeaderValue = "")
|
||||
{
|
||||
var message = new MimeMessage();
|
||||
message.From.Add(new MailboxAddress("",MessageFrom));
|
||||
message.To.Add(new MailboxAddress("",MessageTo));
|
||||
message.From.Add(new MailboxAddress("", MessageFrom));
|
||||
message.To.Add(new MailboxAddress("", MessageTo));
|
||||
message.Subject = MessageSubject;
|
||||
|
||||
message.Body = new TextPart("plain")
|
||||
@@ -273,12 +273,12 @@ namespace rockfishCore.Util
|
||||
case rfMailAccount.sales:
|
||||
from_account = MAIL_ACCOUNT_SALES;
|
||||
from_account_password = MAIL_ACCOUNT_PASSWORD_SALES;
|
||||
from = new MailboxAddress("",from_account);
|
||||
from = new MailboxAddress("", from_account);
|
||||
break;
|
||||
default:
|
||||
from_account = MAIL_ACCOUNT_SUPPORT;
|
||||
from_account_password = MAIL_ACCOUNT_PASSWORD_SUPPORT;
|
||||
from = new MailboxAddress("",from_account);
|
||||
from = new MailboxAddress("", from_account);
|
||||
break;
|
||||
}
|
||||
reply.From.Add(from);
|
||||
@@ -342,7 +342,7 @@ namespace rockfishCore.Util
|
||||
theBody = StripHTML(ht, true);
|
||||
theBody += "> ";
|
||||
theBody = theBody.Replace("\r\n", "\r\n> ").Trim().TrimEnd('>');
|
||||
theBody ="\r\n"+theBody;//descend the first line under the On you wrote bit
|
||||
theBody = "\r\n" + theBody;//descend the first line under the On you wrote bit
|
||||
|
||||
}
|
||||
else
|
||||
@@ -520,7 +520,7 @@ namespace rockfishCore.Util
|
||||
string CustomHeader = "", string CustomHeaderValue = "")
|
||||
{
|
||||
var message = new MimeMessage();
|
||||
message.From.Add(new MailboxAddress("",MessageFrom));
|
||||
message.From.Add(new MailboxAddress("", MessageFrom));
|
||||
|
||||
|
||||
//case 3512 handle more than one email in the address
|
||||
@@ -530,13 +530,13 @@ namespace rockfishCore.Util
|
||||
var addrs = MessageTo.Split(',');
|
||||
foreach (string addr in addrs)
|
||||
{
|
||||
mbAll.Add(new MailboxAddress("",addr.Trim()));
|
||||
mbAll.Add(new MailboxAddress("", addr.Trim()));
|
||||
}
|
||||
message.To.AddRange(mbAll);
|
||||
}
|
||||
else
|
||||
{
|
||||
message.To.Add(new MailboxAddress("",MessageTo));
|
||||
message.To.Add(new MailboxAddress("", MessageTo));
|
||||
}
|
||||
|
||||
|
||||
@@ -656,12 +656,12 @@ namespace rockfishCore.Util
|
||||
|
||||
public class rfMessageSummary
|
||||
{
|
||||
public string account;
|
||||
public uint id;
|
||||
public string from;
|
||||
public string subject;
|
||||
public long? sent;
|
||||
public string flags;
|
||||
public string account { get; set; }
|
||||
public uint id { get; set; }
|
||||
public string from { get; set; }
|
||||
public string subject { get; set; }
|
||||
public long? sent { get; set; }
|
||||
public string flags { get; set; }
|
||||
}
|
||||
|
||||
//Fetch a single string preview of message by Account / folder / UID
|
||||
@@ -737,9 +737,9 @@ namespace rockfishCore.Util
|
||||
|
||||
public class rfMessagePreview
|
||||
{
|
||||
public bool isKeyRequest;
|
||||
public string preview;
|
||||
public uint id;
|
||||
public bool isKeyRequest { get; set; }
|
||||
public string preview { get; set; }
|
||||
public uint id { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace rockfishCore.Util
|
||||
{
|
||||
public static class RfVersion
|
||||
{
|
||||
public const string NumberOnly="6.8";
|
||||
public const string NumberOnly="6.9";
|
||||
public const string Full = "Rockfish server " + NumberOnly;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user