Maybe you can just move messages from POP3 Profile to IMAP Profile from your favorite email app.
If not, emails are stored in /data/data/com.android.email/databases/EmailProviderBody.db .
The non-rooting method
You can get these files with adb when usb-debugging is enabled in developer settings, then run from cmd.exe
:
adb backup com.android.email
Convert backup.ab
with android-backup-extractor after java is installed:
java.exe -jar abe.jar unpack backup.ab backup.tar
Extract EmailProviderBody.db
from backup.tar with 7-zip.
Convert emails to *.eml with AndroidEmailExtractor after Groovy is installed.
Import the *.eml files in outlook express, move the messages to imap Sent folder, sync imap with new device.
The root method:
(If POP3 on your new device is ok for you)
View the ownership and file permissions from adb shell (new device)
adb shell
su
ls -lnZ /data/data/com.android.email/databases
Copy all EmailProvider.db* EmailProviderBody.db* to the new device (or folder database) from cmd
exit
exit
adb push C:\Android\Backup\email\databases /data/data/com.android.email/
Restore ownership and file permissions from adb shell, where 100xx is the uid from above
adb shell
su
chown -hR 100xx.100xx /data/data/com.android.email/databases
chmod 0660 /data/data/com.android.email/databases/*
chcon -hR u:object_r:app_data_file:s0 /data/data/com.android.email/databases
Reboot the device. Old emails should be restored to the new device.