Operating System - HP-UX
1837523 Members
3501 Online
110117 Solutions
New Discussion

elm command line options for Cc:?

 
SOLVED
Go to solution
Denver Osborn
Honored Contributor

elm command line options for Cc:?

Has anyone used elm from the command line to send a message and Cc: to another user without having to interract at the command line? I can't seem to do it and don't think elm can.
9 REPLIES 9
Yossi Shalit
Occasional Contributor

Re: elm command line options for Cc:?

We use a lot 'elm' just from command line : elm -s email-address < file-name.
Denver Osborn
Honored Contributor

Re: elm command line options for Cc:?

Thanks for the reply. I'm able to send to multiple users, but in the recieved email both users get put in the To: field. I'm trying to send a message to 2 users, one will be in the To: line the other will be Cc:
CHRIS_ANORUO
Honored Contributor

Re: elm command line options for Cc:?

Type 'elm' at the command prompt and using the Message option from the menu screen, you have a field to enter for copied receipient.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Yossi Shalit
Occasional Contributor

Re: elm command line options for Cc:?

to send to Cc, check in elmrc configuration file that 'askcc' os ON. if that's the case, you should be prompted to enter your Cc address. good luck.
Kevin Ernst
Regular Advisor
Solution

Re: elm command line options for Cc:?

Denver:

I'm pretty sure you can do it (completely non-interactively) with 'sendmail,' with a command line something like this:

sendmail addr1@yourcompany.com [addr2 addr3 ... ] <Cc: cc1@yourcompany.com [, cc2, cc3 ... ]
Subject: Testing...

Hello world!
EOF

Most shells should support the 'here' document notation (read text up to 'end-of-input' marker "EOF")--ksh, csh, and sh do for sure. You can either specify the 'to' addresses as arguments to sendmail, or give the '-t' option to sendmail and include them in the here document--which constitutes the headers *and* body of the message. You might have to use the '-t' option regardless in order for the 'Cc:' header to be recognized, I'm not sure.

You can specify any other headers you like in the here document, since they will end up being the 'real' RFC-822 headers of the outgoing message. I like to reference the name and version of the script that's doing the mailing in the 'X-Mailer' header. RFC-822 provides for 'user-defined fields,' which start with the string "X-", so you can include any other information you want to in custom 'X-' headers.
Kevin Ernst
Regular Advisor

Re: elm command line options for Cc:?

Yick, it got wrapped. The "<
Kevin Ernst
Regular Advisor

Re: elm command line options for Cc:?

Um, if you're running interactively in a command shell, that is. In a script, you obviously wouldn't be prompted for more input.
Kevin Ernst
Regular Advisor

Re: elm command line options for Cc:?

Whoa, ten points! Thanks Denver! =)
Denver Osborn
Honored Contributor

Re: elm command line options for Cc:?

Thanks for the reply Kevin!

I wanted something that didnt need interaction and would allow me to send email w/ a Cc: to someone. couldnt find a way to do it w/ elm unless interaction was used and I didnt think to use sendmail or the options to use.

Thanks again.