Open WhatsApp on your source Android/iOS device and go to Settings -> Chats Settings -> Chat History -> Email chat.
Choose the WhatsApp messages which you need to transfer. A pop-up window saying "attaching media will generate a larger email message" will appear. You can click "Without media" or "Attach Media" according to your needs. Please note that transferring WhatsApp chats with media will take longer time.
Type your email address on the sending page and press "Send" button.
Once the messages have been sent, log into your email account on your destination iOS/Android device. Then you can view the transferred WhatsApp chat history.
Note: You can not sync the emailed messages and attachments to the WhatsApp application on your new Android/iOS device, but your messages will be transferred as requested.