Nothing to stop you mailing from outside Canada except you can only renew from inside Canada so all your information should reflect that you are in Canada at the time of application.
For sure you should not misrepresent yourself as being in the country at the time of application when in fact you may be living outside of the country. Also be aware IRCC often request for cards to be collected in person and of course they will not mail outside of the country.
You should really assume that to follow the rules you cannot renew from outside Canada and if you need to return after your card has expired you will need a PRTD.