The "default" port is 25 for SMTP, but for success you must use the port specified by your ISP or mail service. Many ISPs now specify port 587 and SSL. Some will not pass outgoing traffic on port 25. The SMTP port is set in the "Account Information" tab in Mail account prefs. You may also have to specify (or not) Password authentication.
The port setting in the "Advanced" tab is for "incoming" POP or IMAP mail. This is usually set for port 110 or, more likely now, using SSL, at 995. Gmail wants port 993/SSL here.