public void UpdateItemForAllAddBooks(List <string> emailList, string uri, CardDavItem user, int tenantId = 0, string changedEmail = null)
        {
            var authorization = GetSystemAuthorization();

            if (changedEmail != null)
            {
                var deleteUrlBook = GetRadicaleUrl(uri, changedEmail.ToLower(), true, true);
                var davRequest    = new DavRequest()
                {
                    Url           = deleteUrlBook,
                    Authorization = authorization
                };
                RadicaleClient.RemoveAsync(davRequest).ConfigureAwait(false);

                try
                {
                    var dbConn = new DbRadicale();
                    dbConn.RemoveCardDavUser(tenantId, user.ID.ToString());
                }
                catch (Exception ex)
                {
                    Logger.Error("ERROR: " + ex.Message);
                }
            }

            foreach (string email in emailList)
            {
                try
                {
                    var currentEmail = email.ToLower();
                    var userData     = GetUserSerialization(user);
                    var requestUrl   = GetRadicaleUrl(uri, currentEmail, true, true, itemID: user.ID.ToString());
                    UpdateItem(requestUrl, authorization, userData, uri).ConfigureAwait(false);
                }
                catch (Exception ex)
                {
                    Logger.Error("ERROR: " + ex.Message);
                }
            }
        }
        public string GetUserSerialization(CardDavItem user)
        {
            var sex = (user.Sex.HasValue) ? user.Sex.Value ? "M" : "W" : string.Empty;

            var builder = new StringBuilder();

            builder.AppendLine("BEGIN:VCARD");
            builder.AppendLine("UID:" + user.ID.ToString());
            builder.AppendLine("N:" + user.LastName + ";" + user.FirstName);
            builder.AppendLine("FN:" + user.FirstName + " " + user.LastName);
            builder.AppendLine("EMAIL:" + user.Email);
            builder.AppendLine("TEL:" + user.MobilePhone);
            builder.AppendLine($"BDAY:{user.BirthDate:s}");
            builder.AppendLine("TITLE:" + user.Title);
            builder.AppendLine("URL:" + "");
            builder.AppendLine("GENDER:" + sex);
            builder.AppendLine($"REV:{DateTime.Now:s}");
            builder.AppendLine("TZ:" + DateTimeOffset.Now.Offset);
            builder.AppendLine("ORG:");
            builder.AppendLine("END:VCARD");

            return(builder.ToString());
        }