emails: fix sending emails to invalid addresses.
Fix mailers to not attempt deliveries to invalid or nonexistent email addresses. This usually happened when someone changed their email, and we tried to send a confirmation email to a nonexistent address.
This commit is contained in:
@@ -90,7 +90,7 @@ class UsersController < ApplicationController
|
||||
flash[:notice] = "Sign up failed: #{@user.errors.full_messages.join("; ")}"
|
||||
else
|
||||
session[:user_id] = @user.id
|
||||
UserMailer.welcome_user(@user).deliver_later if @user.can_receive_email?(require_verification: false)
|
||||
UserMailer.welcome_user(@user).deliver_later
|
||||
set_current_user
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user