Configure gmail in linux shell for sending email

Hello, i have a problem sending emails in the command line. I have introduced this command:
sendEmail -f my.account@gmail.com -t myself@domain.tld \
-u this is the test tile -m �this is a test message� \
-s smtp.gmail.com \
-o tls=yes \
-xu usernameonly -xp mypasswd

but then i received this message:
sendEmail[13230]: ERROR => Connection attempt to smtp.gmail.com:25 failed: IO::Socket::INET: connect: Connection timed out

Can anyone tell me what to do so i can resolve this problem?

Hi limadario,

The Google smtp uses port 587.

Hope this helps
Santiago