Skip to content

How can I send a mail via the CLI in DMS with a file attached? #4349

Answered by polarathene
unsubscrieb asked this question in Q&A
Discussion options

You must be logged in to vote

the email is sending but the log file which should be attached is missing and the path is prepended to the mail body.

Oops I misread the issue, sorry about that.

The -a option you provided to mail also appears to be for setting a header, not attaching a file? I am not fond of the mail command myself as from what I've read it varies by system. It's not always the same program. In our case it's an alias to mailx IIRC.

$ mail -h

mail: invalid option -- 'h'
usage: mail [-dEIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-r from-addr] [-s subject] [--] to-addr ...
       mail [-dEIiNnv] -f [name]
       mail [-dEIiNnv] [-u user]

Those then use sendmail I think to send the mail, which for DMS …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@unsubscrieb
Comment options

@polarathene
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by unsubscrieb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
kind/question Someone asked a question - feel free to answer area/documentation
2 participants