scripts/generate-template.sh: Allow to configure envelope from when send...

...ing email

This patch just changes from mail to sendmail to allow to configure the envelope
from of the email sent. Also, if no env from nor realn is configured, the
email is not sent.