Welcome email for manually registered accounts

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I am trying to find a way to send the welcome/registration confirmation email when I manually create an account.  We do not offer public registration on our website but I still would like to have this automated when I create the account for them through the admin panel.  Any assistance?
5 years ago
One simple way is to change the setting the Customer Settings -> Registration method
Set it to "A customer should be approved to admin"
Then the Send Welcome Message Button will be displayed when editing a customer

If you don't want to change the method of registration you need to edit the code below and the button will display all the time.

        public virtual CustomerModel PrepareCustomerModel(CustomerModel model, Customer customer, bool excludeProperties = false)
        {
            if (customer != null)
            {
                //fill in model values from the entity
                model = model ?? new CustomerModel();

                model.Id = customer.Id;
                model.DisplayVatNumber = _taxSettings.EuVatEnabled;
                model.AllowSendingOfWelcomeMessage = customer.IsRegistered() &&
                    _customerSettings.UserRegistrationType == UserRegistrationType.AdminApproval;

comment out this part

&& _customerSettings.UserRegistrationType == UserRegistrationType.AdminApproval;

If you want to happen automatically - edit the code and call the routine SendWelcomeMessage(CustomerModel model) after the customer is entered.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.