Updates to DropDownPanel, Baseline, & Controls
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
public partial class frmSendErrorLog : Form
|
||||
{
|
||||
private string _ErrorLogPath;
|
||||
private readonly string _ErrorLogPath;
|
||||
public bool OutlookEmail
|
||||
{
|
||||
get { return rbOutlook.Checked; }
|
||||
@@ -75,17 +75,21 @@ namespace Volian.Controls.Library
|
||||
FileStream fs = null;
|
||||
try
|
||||
{
|
||||
MailMessage mm = new MailMessage();
|
||||
mm.From = new MailAddress(SMTPUser);
|
||||
mm.To.Add("support@volian.com");
|
||||
mm.Subject = $"PROMS Error Log {DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss")}";
|
||||
MailMessage mm = new MailMessage
|
||||
{
|
||||
From = new MailAddress(SMTPUser)
|
||||
};
|
||||
mm.To.Add("support@volian.com");
|
||||
mm.Subject = $"PROMS Error Log {DateTime.Now:MM/dd/yyyy hh:mm:ss}";
|
||||
mm.Body = $"{Header}\r\n\r\n{tbContent.Text}";
|
||||
fs = File.Open(_ErrorLogPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
mm.Attachments.Add(new Attachment(fs, "ErrorLog.txt"));
|
||||
SmtpClient sc = new SmtpClient(SMTPServer);
|
||||
sc.EnableSsl = true;
|
||||
sc.Credentials = new NetworkCredential(SMTPUser, tbPassword.Text);
|
||||
sc.Send(mm);
|
||||
SmtpClient sc = new SmtpClient(SMTPServer)
|
||||
{
|
||||
EnableSsl = true,
|
||||
Credentials = new NetworkCredential(SMTPUser, tbPassword.Text)
|
||||
};
|
||||
sc.Send(mm);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -129,7 +133,7 @@ namespace Volian.Controls.Library
|
||||
LBApplicationClass app = new LBApplicationClass();
|
||||
LBMailItemClass msg = app.CreateMailItem();
|
||||
msg.Recipients.Add("support@volian.com");
|
||||
msg.Subject = $"PROMS Error Log {DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss")}";
|
||||
msg.Subject = $"PROMS Error Log {DateTime.Now:MM/dd/yyyy hh:mm:ss}";
|
||||
msg.BodyFormat = LBOlBodyFormat.olFormatPlain;
|
||||
msg.Body = $"{Header}\r\n\r\n{tbContent.Text}";
|
||||
msg.AddAttachment(_ErrorLogPath);
|
||||
|
||||
Reference in New Issue
Block a user