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
link|improve this question

57% accept rate
feedback

1 Answer

up vote 1 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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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