'crontab MAILFROM with name

my crontab is set bellow:

MAILFROM=name <[email protected]>
[email protected]
* * * * * root echo "Message here"

so I get the error:

May  4 14:31:01 ubuntu22 CRON[71554]: (root) UNSAFE MAIL (name <[email protected]>)

the message is sent with default From: Cron Daemon <root@ubuntu22>

if I set [email protected] it works fine but have no name.

Is there a way to custom MAILFROM with mail name and not email only?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source