Both Connect and ConnectSSL methods have overloads that take port as one of the parameters:
IMail email = Mail.Text("Hello")
.From("from@example.com")
.To("to@example.com")
.Subject("Subject")
.AddAttachment(@"c:\tmp.doc").SetFileName("document.doc")
.Create();
using(Smtp smtp = new Smtp());
{
smtp.Connect("server", 25); // or smtp.ConnectSSL("server", 465);
smtp.UseBestLogin("user", "password");
smtp.SendMessage(email);
smtp.Close();
}