Ejemplo n.º 1
0
        private static void SendMail(BigDB bigDb, EEMail mail, Callback <DatabaseObject> callback)
        {
            var obj = new DatabaseObject()
                      .Set("From", mail.From)
                      .Set("To", mail.To)
                      .Set("Date", mail.Date)
                      .Set("Subject", mail.Subject)
                      .Set("Body", mail.Body);

            bigDb.CreateObject("Mails", null, obj, callback ?? (db => { }));

            // Delete mail if the inbox got too full
            GetMail(bigDb, mail.To, m => { });
        }
Ejemplo n.º 2
0
 private static void DeleteMail(BigDB bigDb, EEMail mail)
 {
     bigDb.DeleteKeys("Mails", mail.Key);
 }