add error handling
parent
5a6179ed6e
commit
649829f307
|
@ -70,6 +70,8 @@ namespace OpenSim.Modules.EMail
|
|||
scene.RegisterModuleInterface<IEmailModule>(this);
|
||||
m_scene = scene;
|
||||
|
||||
if(IMAP_SERVER_HOSTNAME != String.Empty)
|
||||
{
|
||||
m_timer = new Timer();
|
||||
|
||||
m_timer.Interval = 1000 * 60;
|
||||
|
@ -77,6 +79,7 @@ namespace OpenSim.Modules.EMail
|
|||
m_timer.Enabled = true;
|
||||
m_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
@ -128,6 +131,8 @@ namespace OpenSim.Modules.EMail
|
|||
#endregion
|
||||
|
||||
private void checkForMails(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_log.Info("[" + Name + "] checkForMails");
|
||||
|
||||
|
@ -182,6 +187,10 @@ namespace OpenSim.Modules.EMail
|
|||
IMAPInbox.Expunge();
|
||||
client.Disconnect(true);
|
||||
}
|
||||
}catch(Exception _error)
|
||||
{
|
||||
m_log.Error("[" + Name + "] " + _error.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendEmail(UUID objectID, string address, string subject, string body)
|
||||
|
|
Loading…
Reference in New Issue