For iPhone:
Step 1: On the home page, open the Settings app.
Step 2: In Settings, choose the Mail, Contacts, and Calendars option.
Step 3: Tap the account that you want to edit.
Step 4: Under Outgoing Mail Server, select the SMTP option.
Step 5: Make sure the Primary Server is set to On.
Step 6: Find the Server Port option.
Step 7: Change the outgoing server port to 25, 26 or 587 or 465 (SSL).
Step 8: Now the outgoing server port will be changed.
For Android:
Step 1: Access your mail application, then choose the Menu or More Settings option.
Step 2: On the Settings panel, click the Account settings.
Step 3: When you choose to edit the account, click Next and you can see the Outgoing server settings panel.
Step 4: Change the outgoing server port to 25, 26 or 587 or 465 (SSL).
Step 5: Now the outgoing server port will be changed.