How can I configure WhatsApp so that an email is sent to me when someone sends me a message on WhatsApp? How can I configure WhatsApp so that an email is sent to me when someone sends me a message on WhatsApp?
Whatsapp natively does not support this, besides, it does not expose an API for other apps to use, so it's not possible. But using the notifications generated on receipt of messages, one can workaround these limitations.
automation is the way to go because, you need an action to be taken  in case WhatsApp is received from one / any senders.
Many automation apps are available. I prefer using MacroDroid , since it is free (upto 5 macros) and easy to learn. To understand how MacroDroid works, see answer here (Not affiliated to any app).
MacroDroid Setup

Give MacroDroid all the permissions it needs.

From Settings → Email account → Gmail account. Enter your account details and authenticate (MacroDroid needs to have access to be able to send you mails).


Create a macro as explained, name it whatever you like and save it.

Trigger: Notification → Notification Received → Select Application → Whatsapp → Text Content → Any (this will mail you for all messages received)

Make sure to uncheck prevent
multiple triggers
A variant below for one contact
Notification → Notification Received → Select Application → Whatsapp → Text Content → Matches (or contains) → contact name (you can use wild cards or Regular expressions(Regex)
matching too)

Actions: Send Email → account → Email address (where you want the mail to be sent to) → Subject, copy paste

Whatsapp message from [not_title] at  [hour12].[minute][am_pm]
Message Text, copy paste [notification]
You will get mails with sender name, time stamp and textsee note as in screenshot below (Aa is a contact and I configured for a single sender)

Note:

Email  shows the text in notification, which may not be complete text, because Notifications are restricted to 500 characters . Long texts are truncated (in my tests text till see more was mailed).

Notifications need to be enabled for Whatsapp