add send script

This commit is contained in:
Satya Benson 2023-05-07 16:46:00 +00:00
parent d53b44f711
commit 8645d27395
1 changed files with 20 additions and 0 deletions

20
send.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# Check if both arguments are provided
if [ $# -ne 2 ]; then
echo "Usage: send <to_address> <filename>"
exit 1
fi
# Assign arguments to variables
to_address=$1
filename=$2
# Change directory to /home/gemini/misfin/
cd /home/gemini/misfin/ || exit 1
# Get the content of the message from the file
message_content=$(cat "$filename")
# Run the python3 command
python3 -m misfin send-as mail_satch.pem "$to_address" "$message_content"