change time to send the query

master
Christopher 2020-07-01 21:49:54 +02:00
parent 8a89d5968e
commit 7d2c3bbba4
1 changed files with 15 additions and 12 deletions

View File

@ -78,7 +78,7 @@ namespace OpenSim.Modules.EMail
m_scene = scene;
m_timer_send = new Timer();
m_timer_send.Interval = 1000 * 10;
m_timer_send.Interval = 1000 * 3;
m_timer_send.Elapsed += sendAllMails;
m_timer_send.Enabled = true;
m_timer_send.Start();
@ -303,11 +303,13 @@ namespace OpenSim.Modules.EMail
}
public void SendEmail(UUID objectID, string address, string subject, string body)
{
try
{
SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID);
try
{
lock(m_sendMessages)
{
MimeMessage message = new MimeMessage();
message.From.Add(new MailboxAddress(sceneObject.Name, sceneObject.UUID + "@" + SMTP_SERVER_SENDER));
message.To.Add(new MailboxAddress("", address));
@ -319,11 +321,12 @@ namespace OpenSim.Modules.EMail
message.Headers.Add(new Header(Encoding.UTF8, "Location", m_scene.Name + "@" + sceneObject.GetWorldPosition().ToString()));
m_sendMessages.Add(message);
}
}catch(Exception _error)
{
m_log.Error("[" + Name + "] " + _error.Message);
}
}
public Email GetNextEmail(UUID objectID, string sender, string subject)