Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to send an rmail with sendemail. installed via macports. What is wrong in the following and how do I go about fixing it?

bash-3.2$ sendemail -f username@gmail.com -u files -m message -t username@gmail.com -s smtp.gmail.com -a ~/temp/folder/*pdf
Jan 31 01:49:43 mycomp sendemail[10391]: ERROR => Connection attempt to smtp.gmail.com:25 failed: IO::Socket::INET: connect: Connection refused
share|improve this question
up vote 3 down vote accepted

Gmail wont accept connection without TLS support and the specific port 587 for it. Read it here. Execute the following -

sendemail -f username@gmail.com -u files -m message -t username@gmail.com -s smtp.gmail.com:587 -o tls=yes -a ~/temp/folder/*pdf

If this doesn't work, then provide your SMTP username and password with -xu and -xp options respectively.

share|improve this answer
    
+1 this works :) – wiak Mar 15 '14 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .