I would like to integrate the following terminal command into a Perl script.
Terminal command:
mutt -s "User Monitoring" -a "/home/mipa/Documents/System_Monitoring/protocol_name.csv" -- mipa@localhost.localdomain
The command sends local mail containing a file attachment to a user on the same system.
I have a small problem with the command though. It does seem to require more user interaction than just the command listed here. The command requires the user to follow a menu to confirm the values and hit the "y" key to send.
My question here is two-folded. Is there a similar mail command that does not require user interaction and works by just following a single command with predefined flags? And how would I integrate this command into a Perl script where I would be able to choose the file name, and the receiving user followed by issuing the command?
Any guidance regarding a possible solution is highly appreciated.