Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 at 14:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.