You should be fine. But, if you want to be extra safe.
You can look for Opera 12.17's data at "C:\Users\user\AppData\Roaming\Opera\Opera" and "C:\Users\user\AppData\Local\Opera\Opera" (assuming the folder in program files that you installed to was named "Opera"). While Opera Mail and Opera are closed, you can just rename "\Opera\Opera" to "\Opera\Opera off" for both of those. Then, start Opera Mail and if all is well, you can just delete those folders to clean up things. Then, you can uninstall Opera 12.17 if you want as all your mail will be in "C:\Users\user\AppData\Local\Opera Mail\Opera Mail\mail".
But, if you've been using the old Opera for a really long time, all the data for Opera 12.17 might be in "\Opera\profile" in the program files folder.
Also, in "C:\Users\user\AppData\Roaming\Opera Mail\Opera Mail\operaprefs.ini", unless you're using a custom mail folder location, you should make sure that there's no "Mail Root Directory" line under the "[mail]" section. If you are using a custom mail folder location, make sure the path for the mail root directory is correct on that line and back up the mail folder at that path before you run the 12.17 install process. That way, if anything funky happens, it's a quick fix.