add filter for sender and subject

master
Christopher 2020-07-01 21:15:44 +02:00
parent 4f83c0129e
commit d970dcf602
1 changed files with 7 additions and 3 deletions

View File

@ -256,7 +256,8 @@ namespace OpenSim.Modules.EMail
using (var client = new SmtpClient()) using (var client = new SmtpClient())
{ {
client.CheckCertificateRevocation = false; client.CheckCertificateRevocation = false;
client.Timeout = 10;
if (SMTP_SERVER_SSL == true) if (SMTP_SERVER_SSL == true)
{ {
client.Connect(SMTP_SERVER_HOSTNAME, SMTP_SERVER_PORT, SecureSocketOptions.Auto); client.Connect(SMTP_SERVER_HOSTNAME, SMTP_SERVER_PORT, SecureSocketOptions.Auto);
@ -309,8 +310,11 @@ namespace OpenSim.Modules.EMail
lslMessage.numLeft = messages.Count - 1; lslMessage.numLeft = messages.Count - 1;
m_messages.Remove(messages[0]); if((lslMessage.sender == sender || sender == "") && (lslMessage.subject == subject || subject == ""))
return lslMessage; {
m_messages.Remove(messages[0]);
return lslMessage;
}
} }
else else
{ {