change time to send the query
parent
8a89d5968e
commit
7d2c3bbba4
|
@ -78,7 +78,7 @@ namespace OpenSim.Modules.EMail
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_timer_send = new Timer();
|
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.Elapsed += sendAllMails;
|
||||||
m_timer_send.Enabled = true;
|
m_timer_send.Enabled = true;
|
||||||
m_timer_send.Start();
|
m_timer_send.Start();
|
||||||
|
@ -303,11 +303,13 @@ 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);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock(m_sendMessages)
|
||||||
|
{
|
||||||
MimeMessage message = new MimeMessage();
|
MimeMessage message = new MimeMessage();
|
||||||
message.From.Add(new MailboxAddress(sceneObject.Name, sceneObject.UUID + "@" + SMTP_SERVER_SENDER));
|
message.From.Add(new MailboxAddress(sceneObject.Name, sceneObject.UUID + "@" + SMTP_SERVER_SENDER));
|
||||||
message.To.Add(new MailboxAddress("", address));
|
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()));
|
message.Headers.Add(new Header(Encoding.UTF8, "Location", m_scene.Name + "@" + sceneObject.GetWorldPosition().ToString()));
|
||||||
|
|
||||||
m_sendMessages.Add(message);
|
m_sendMessages.Add(message);
|
||||||
|
}
|
||||||
|
|
||||||
}catch(Exception _error)
|
}catch(Exception _error)
|
||||||
{
|
{
|
||||||
m_log.Error("[" + Name + "] " + _error.Message);
|
m_log.Error("[" + Name + "] " + _error.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Email GetNextEmail(UUID objectID, string sender, string subject)
|
public Email GetNextEmail(UUID objectID, string sender, string subject)
|
||||||
|
|
Loading…
Reference in New Issue