check for debug

master
Christopher 2020-07-01 18:56:15 +02:00
parent 0821d12685
commit 517cd8c56e
1 changed files with 15 additions and 6 deletions

View File

@ -150,23 +150,31 @@ namespace OpenSim.Modules.EMail
if (IMAP_SERVER_SSL == true)
{
m_log.Info("[" + Name + "] Connect SSL");
if (m_debug)
m_log.Info("[" + Name + "] Connect SSL");
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.Auto);
}
else if (IMAP_SERVER_TLS == true)
{
m_log.Info("[" + Name + "] Connect TLS");
if (m_debug)
m_log.Info("[" + Name + "] Connect TLS");
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.StartTlsWhenAvailable);
}
else
{
m_log.Info("[" + Name + "] Connect None");
if (m_debug)
m_log.Info("[" + Name + "] Connect None");
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.None);
}
if (IMAP_SERVER_LOGIN != String.Empty && IMAP_SERVER_PASSWORD != String.Empty)
{
m_log.Info("[" + Name + "] Login with " + IMAP_SERVER_LOGIN + ";" + IMAP_SERVER_PASSWORD);
if (m_debug)
m_log.Info("[" + Name + "] Login with " + IMAP_SERVER_LOGIN + ";" + IMAP_SERVER_PASSWORD);
client.Authenticate(IMAP_SERVER_LOGIN, IMAP_SERVER_PASSWORD);
}
@ -174,7 +182,9 @@ namespace OpenSim.Modules.EMail
IMailFolder IMAPInbox = client.Inbox;
IMAPInbox.Open(FolderAccess.ReadWrite);
m_log.Info("[" + Name + "] Found " + IMAPInbox.Count + " messages.");
if (m_debug)
m_log.Info("[" + Name + "] Found " + IMAPInbox.Count + " messages.");
for (int i = 0; i < IMAPInbox.Count; i++)
{
MimeMessage message = IMAPInbox.GetMessage(i);
@ -188,7 +198,6 @@ namespace OpenSim.Modules.EMail
m_log.Info("[" + Name + "] Objekt ID: " + adress.Address.Split('@')[0]);
}
String UUIDString = adress.Address.Split('@')[0].Trim();
if(isUUID(UUIDString))