OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: jonm on February 16, 2022, 01:40:00 PM

Title: Sending emails from scripts
Post by: jonm on February 16, 2022, 01:40:00 PM
I have a requirement to send emails from various shell scripts. I've installed the postfix plugin but there's no commandline email client e.g. 'mail' to use in scripts. How do I install that? Apologies if this is a stupid question...
Title: Re: Sending emails from scripts
Post by: bartjsmit on February 16, 2022, 01:50:30 PM
OPNsense is mostly PHP according to Github. https://github.com/opnsense/core
Have you tried its mail function? https://www.w3schools.com/php/func_mail_mail.asp

Bart...
Title: Re: Sending emails from scripts
Post by: fabian on February 16, 2022, 06:40:25 PM
This or postfix provides a tool as well.
Title: Re: Sending emails from scripts
Post by: jonm on February 16, 2022, 08:29:37 PM
Thanks, what's the postfix option please?
Title: Re: Sending emails from scripts
Post by: fabian on February 17, 2022, 07:20:59 PM
There is no postfix solution, there are many. It is a full featured MTA (that can work in standalone mode, satellite mode,... ) and has utilities like sendmail.