If you only pre-qualified for a loan and did not submit a final loan application, the email or letter you received is likely an adverse action notice, and is a routine result of filling out a pre-qualification form. Any time a lender reviews your credit information to determine whether to give you a loan offer (like the soft credit pull they did when you checked your rate), they are legally required to explain why they rejected you. This is why you're getting a notification. Your credit was NOT affected.
If the bank is contacting you about a formal loan application that you submitted, your credit may have been affected.