public async Task <bool> Handle(DeleteAccountCommand request, CancellationToken cancellationToken) { //activity log await _customerActivityService.InsertActivity("PublicStore.DeleteAccount", "", _translationService.GetResource("ActivityLog.DeleteAccount"), request.Customer); //send notification to customer await _messageProviderService.SendCustomerDeleteStoreOwnerMessage(request.Customer, _languageSettings.DefaultAdminLanguageId); //delete emails await _queuedEmailService.DeleteCustomerEmail(request.Customer.Email); //delete newsletter subscription var newsletter = await _newsLetterSubscriptionService.GetNewsLetterSubscriptionByEmailAndStoreId(request.Customer.Email, request.Store.Id); if (newsletter != null) { await _newsLetterSubscriptionService.DeleteNewsLetterSubscription(newsletter); } //delete account await _customerService.DeleteCustomer(request.Customer); return(true); }