1-download these 2 certificates:

Android (import 2 certs above):
-Settings,
-Security,
-Encryption & Credentials,
-Install a certificate,
-CA certificate

Iphone:
If you have more than one mail account, skip to step 2.


-Only applicable if you have one mail account on your phone: Create a bogus mail account with fake settings. Just get it to be saved as a legit-looking account, and you should be OK.
-Delete the problematic account.
-In any other mail account, find where all your SMTP servers are listed (Account > SMTP).
-The one from the problematic account should still be there. Tap on it to get the details, and hit Delete Server. 
-Make sure you don't have multiple listings for it. If you do, delete those, too.
-Re-add the account you deleted. You should finally get the full Cannot Verify Server Identity dialog with Continue, Details, and Cancel.
-Assuming you need to trust the certificate, hit Details. You should see the Trust option. Tap it!
-You may need to repeat step 7 to cover both incoming and outgoing servers.
-If you created a bogus account in step 1, be sure to delete it or Mail will get stuck on trying to get it to work.



-Jump to number 6 in page below.
Install certificates on ios


mail settings:
incoming: imap.spgw.ca:143 (imaps)
outgoing: smtp.spgw.ca:587 (starttls)