Sendmail/ssmtp from script or command line

Hi, I have configured the email-server (smtp, ssl/tls) and the test mail arrives in my mailbox just fine. Now I would like to send emails from a script or from the command line, with the sendmail command (echo “Subject: test” | sendmail -v my.mail@address.org), but do not succeed. There is no error message, but no mail arrives either. Which command is used to send the testmail? Where is the error in the command I am using?

Thanks a lot for your help

David

Hi @Schlemil

The smtp option on the settings page of Nextcloud does not use sendmail afaik. You could use sendmail as an alternative but then you would have to configure it on the OS level.

Maybe this is of any help…

Personlly I have no expirience with sendmail. I use exim on Debian and Postfix on Ubuntu to send system notificatiions via an external SMTP.

Thanks @bb77,

it’s good to know that Nextcloud use a different program. Actually, I do too (I should have said so!), since I have ssmtp installed, which emulates sendmail. But it seems that there is something wrong in my configuration, and it is a great help to know that Nextcloud does not use the sendmail command at all!

I think they have used Swiftmailer and are now using Symfony Mailer, but I’m not a 100% sure.