How to manually add users and email in console mode?

I do have a question about email notifications using this method.

I have added users through the console using the following commands:

u = User.create!(username: ‘xx’, email: ‘xx@xx.com’, password: ‘xxx’, mailing_list_mode: ‘true’);u.approve(Discourse.system_user, false) ; u.activate

I have enabled “Send all new users a welcome message with a quick start guide” in http://forum.brickfield.org.uk/admin/site_settings/category/uncategorized

However, emails are not being sent to users being added in this way. They are being sent to users I add through the web front end … (ie it’s not an email problem).

I want the users I add automatically to receive the welcome email - I am migrating a googlegroup and the welcome email will be useful in moving people. So does anyone know how I can alert the system to these added users being “new” users from the point of view of receiving the welcome message?

Thank you for any help

Tony

1 Like