check for debug
parent
0821d12685
commit
517cd8c56e
|
@ -150,23 +150,31 @@ namespace OpenSim.Modules.EMail
|
||||||
|
|
||||||
if (IMAP_SERVER_SSL == true)
|
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);
|
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.Auto);
|
||||||
}
|
}
|
||||||
else if (IMAP_SERVER_TLS == true)
|
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);
|
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.StartTlsWhenAvailable);
|
||||||
}
|
}
|
||||||
else
|
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);
|
client.Connect(IMAP_SERVER_HOSTNAME, IMAP_SERVER_PORT, SecureSocketOptions.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IMAP_SERVER_LOGIN != String.Empty && IMAP_SERVER_PASSWORD != String.Empty)
|
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);
|
client.Authenticate(IMAP_SERVER_LOGIN, IMAP_SERVER_PASSWORD);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -174,7 +182,9 @@ namespace OpenSim.Modules.EMail
|
||||||
IMailFolder IMAPInbox = client.Inbox;
|
IMailFolder IMAPInbox = client.Inbox;
|
||||||
IMAPInbox.Open(FolderAccess.ReadWrite);
|
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++)
|
for (int i = 0; i < IMAPInbox.Count; i++)
|
||||||
{
|
{
|
||||||
MimeMessage message = IMAPInbox.GetMessage(i);
|
MimeMessage message = IMAPInbox.GetMessage(i);
|
||||||
|
@ -188,7 +198,6 @@ namespace OpenSim.Modules.EMail
|
||||||
m_log.Info("[" + Name + "] Objekt ID: " + adress.Address.Split('@')[0]);
|
m_log.Info("[" + Name + "] Objekt ID: " + adress.Address.Split('@')[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String UUIDString = adress.Address.Split('@')[0].Trim();
|
String UUIDString = adress.Address.Split('@')[0].Trim();
|
||||||
|
|
||||||
if(isUUID(UUIDString))
|
if(isUUID(UUIDString))
|
||||||
|
|
Loading…
Reference in New Issue