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 => { }); }
private static void DeleteMail(BigDB bigDb, EEMail mail) { bigDb.DeleteKeys("Mails", mail.Key); }