带有附件错误的 Bash Mutt 电子邮件无法统计:没有这样的文件或目录

Rob*_*Rob 2 email bash mutt

So i,ve read some other posts and tried out the answers, but i still keep running into this problem so i wanted to post a question here and see if anyone else had any other ideas. Keeping in mind i am pretty new to bash so i am iffy on whats available currently for what i,m looking for.

I am trying to automate a process that creates a file then sends it to me. All the above is fine, until i try to automatically email myself the file.

I have this line of code for it

echo "report" | mutt -- "$USEREMAIL" -s "report" -a "my_scripts/cid_reports/trb345432.csv"
Run Code Online (Sandbox Code Playgroud)

When it tries to run this command it throws an error like

Can't stat my_scripts/cid_reports/trb345432.csv: No such file or directory my_scripts/cid_reports/trb345432.csv: unable to attach file.

Any ideas on how i can fix this? I thought mutt was good to handle this, I am going to play with the mail feature and see if i can get any success with that.

The system looks to be running

Mutt 1.4.2.2i (2006-07-14)  
Copyright (C) 1996-2002 Michael R. Elkins and others.  
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -v  
Run Code Online (Sandbox Code Playgroud)

小智 5

mutt -h

-a <file> [...] -- attach file(s) to the message
Run Code Online (Sandbox Code Playgroud)

文件列表必须以“--”序列结束,因此,

echo "hello world" | mutt -s "title" -a /home/test.txt -- ***@**.com
Run Code Online (Sandbox Code Playgroud)

您需要添加“--”。