Exemplo n.º 1
0
 /// <summary>
 ///   Adds a new offline message for the user.
 /// </summary>
 /// <param name = "message"></param>
 public void InsertEmail(Email email)
 {
     GenericUtils.AddGeneric(email.toPrimID, "Emails", UUID.Random().ToString(),
                                     email.ToOSD(), GD);
 }
Exemplo n.º 2
0
        public void InsertEmail(Email email)
        {
            object remoteValue = DoRemote(email);
            if (remoteValue != null || m_doRemoteOnly)
                return;

            GenericUtils.AddGeneric(email.toPrimID, "Emails", UUID.Random().ToString(),
                                            email.ToOSD(), GD);
        }
Exemplo n.º 3
0
        public void InsertEmail(Email email)
        {
            OSDMap sendData = email.ToOSD();

            sendData["Method"] = "insertemail";

            try
            {
                List<string> urls =
                    m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
#if (!ISWIN)
                foreach (string url in urls)
                {
                    OSDMap result = WebUtils.PostToService(url + "osd", sendData, true, false);
                    if(((OSDMap) OSDParser.DeserializeJson(result["_RawResult"]))["Result"].AsBoolean())
                        return;
                }
#else
                foreach (OSDMap result in urls.Select(url => WebUtils.PostToService(url + "osd", sendData, true, false)))
                {
                    if(((OSDMap) OSDParser.DeserializeJson(result["_RawResult"]))["Result"].AsBoolean()) return;
                }
#endif
            }
            catch (Exception e)
            {
                MainConsole.Instance.DebugFormat("[AuroraRemoteEmailConnector]: Exception when contacting server: {0}", e);
            }
        }