add send error handling

master
Christopher 2020-07-01 21:36:10 +02:00
parent c16cd2f9cf
commit b7a69bda80
1 changed files with 38 additions and 31 deletions

View File

@ -240,6 +240,8 @@ namespace OpenSim.Modules.EMail
} }
public void SendEmail(UUID objectID, string address, string subject, string body) public void SendEmail(UUID objectID, string address, string subject, string body)
{
try
{ {
SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID); SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID);
@ -277,6 +279,11 @@ namespace OpenSim.Modules.EMail
client.Send(message); client.Send(message);
client.Disconnect(true); client.Disconnect(true);
} }
}catch(Exception _error)
{
m_log.Error("[" + Name + "] " + _error.Message);
}
} }
public Email GetNextEmail(UUID objectID, string sender, string subject) public Email GetNextEmail(UUID objectID, string sender, string subject)