On these pages the email is optional, but it has the redirect.
I think you should probably move the email before the update code and then move the redirect into the update code and remove it from the email. That way it will always redirect even if the email isn't sent.