Koozali.org: home of the SME Server

Inviare mail da script

Offline simone686

  • ***
  • 71
  • +0/-0
Inviare mail da script
« on: March 20, 2019, 11:05:15 AM »
Salve a tutti..
normalmente al di fuori di sme (CentOS) utilizzo ssmtp come mta per inviare mail attraverso script bash o php.
Mi servirebbe poter accedere al comando mail(x) per aggiungere a degli script cron, l'invio di una mail una volta completato il task.
All'interno di sme come si può configurare un mta per mail da cli ?
Grazie

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Inviare mail da script
« Reply #1 on: March 21, 2019, 07:08:18 PM »
Search the forums for

"mail -s"

e.g.

echo "Hello World" | mail admin@someaddress.com -s "Subject"

Or look here:

https://forums.contribs.org/index.php/topic,52931.msg273281.html#msg273281
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation