Zwischenstand Okt 2020 (6.0.9)
This commit is contained in:
parent
c35ed3707e
commit
eb49b4ec86
Binary file not shown.
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("6.0.8")]
|
||||
[assembly: AssemblyInformationalVersion("6.0.9")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2020 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("6.0.8.*")]
|
||||
[assembly: AssemblyVersion("6.0.9.*")]
|
||||
|
||||
|
||||
@ -145,30 +145,33 @@ namespace bsmd.email
|
||||
|
||||
public static void SendSystemInfo(string subject, string body, string recipient)
|
||||
{
|
||||
using (BSMDMail mailer = new BSMDMail())
|
||||
using BSMDMail mailer = new BSMDMail();
|
||||
if(recipient.Equals(Properties.Settings.Default.POP3User, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
MailMessage message = new MailMessage();
|
||||
MailAddress fromAddress = new MailAddress(Properties.Settings.Default.Sender);
|
||||
message.From = fromAddress;
|
||||
message.Subject = subject;
|
||||
message.IsBodyHtml = false;
|
||||
message.Body = body;
|
||||
log.Warn("system info recipient is pop3 user, skipping send to avoid loops");
|
||||
return;
|
||||
}
|
||||
MailMessage message = new MailMessage();
|
||||
MailAddress fromAddress = new MailAddress(Properties.Settings.Default.Sender);
|
||||
message.From = fromAddress;
|
||||
message.Subject = subject;
|
||||
message.IsBodyHtml = false;
|
||||
message.Body = body;
|
||||
|
||||
message.To.Add(recipient);
|
||||
MailAddress adminAddress = new MailAddress(Properties.Settings.Default.AdminEmail);
|
||||
message.CC.Add(adminAddress);
|
||||
try
|
||||
{
|
||||
mailer.Send(message);
|
||||
}
|
||||
catch (SmtpException smtpException)
|
||||
{
|
||||
log.ErrorFormat("SMTP error while sending e-mail:{0}", smtpException.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("other error while sending e-mail:{0}", ex.Message);
|
||||
}
|
||||
message.To.Add(recipient);
|
||||
MailAddress adminAddress = new MailAddress(Properties.Settings.Default.AdminEmail);
|
||||
message.CC.Add(adminAddress);
|
||||
try
|
||||
{
|
||||
mailer.Send(message);
|
||||
}
|
||||
catch (SmtpException smtpException)
|
||||
{
|
||||
log.ErrorFormat("SMTP error while sending e-mail:{0}", smtpException.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("other error while sending e-mail:{0}", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user