0

I have edited ssmtp.conf file with all the details needed and configured ssmtp ! But when i enter

[root@localhost ssmtp]#    ssmtp user@gmail.com message

in terminal it prompts me with this error!!

[root@localhost ssmtp]#    bash: ssmtp: command not found error

Kindly help me out

(PS: Using Fedora 7 , commands similar to that of Centos)

kartik
  • 55
  • 4
  • You don't invoke the `ssmtp` daemon to send a message. You are looking for the plain old `sendmail` command. Not a programming question, anyway; voting to close as off-topic. – tripleee May 02 '16 at 07:34
  • I have not used ssmtp so far, but I guess it will be good if you look [here](https://support.google.com/mail/answer/180707?hl=en). – sjsam May 02 '16 at 07:35
  • Can anyone explain the reason for the answer downvote? – Inian May 02 '16 at 07:37
  • 1
    `ssmtp` is not installed in the `PATH` of regular users. For example, on Debian, it is in `/usr/sbin/ssmtp`. See my comment above as to why this isn't the command the OP is looking for in the first place anyway. – tripleee May 02 '16 at 07:39

1 Answers1

0

SSMTP is a program which delivers email from a local computer to a configured mailhost (mailhub).[1]

Assuming that you have already set up the ssmtp, first check if the ssmtp daemon is running using :

service ssmtp status

and then you may send mail using the mail command like

echo test | mail -v -s "testing ssmtp setup" user@gmail.com

If you have configured the ssmtp(with ssmtp.conf) with your gmail credentials, the above command will fist send the mail to the gmail hub and once the authentication details are added it will be forwarded to user@gmail.com as if it was originally send from your actual mail account.

sjsam
  • 21,411
  • 5
  • 55
  • 102
  • >>> MAIL From: SIZE=60 AUTH=root@localhost.localdomain 250 2.1.0 ... Sender ok >>> RCPT To: >>> DATA 250 2.1.5 ... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 u474FXTQ011198 Message accepted for delivery kartikdeshpande18@gmail.com... Sent (u474FXTQ011198 Message accepted for delivery) Closing connection to [127.0.0.1] – kartik May 02 '16 at 11:40
  • i am getting the following output !! but no mail delivered to the accounr – kartik May 02 '16 at 11:41