Cc in mail command
The cc
command!
cc
is a Unix command that allows you to send a copy of an email to one or more recipients, in addition to the primary recipient specified in the To:
field. The cc
command is often used to send a copy of an email to someone who is not the primary recipient, but who may still need to be informed about the contents of the email.
The basic syntax of the cc
command is as follows:
cc [options] recipient1 [recipient2...] < message
Here, recipient1
, recipient2
, etc. are the email addresses of the recipients who will receive a copy of the email, and message
is the text of the email.
Some common options for the cc
command include:
-c
or--cc
: Specify the recipients who will receive a copy of the email.-s
or--subject
: Specify the subject line of the email.-f
or--from
: Specify the sender's email address.-a
or--attach
: Attach a file to the email.
Here's an example of how you might use the cc
command:
cc -c [email protected] -s "Meeting reminder" -f [email protected] < message.txt
This command would send an email with the subject "Meeting reminder" from [email protected]
to [email protected]
, with a copy to the sender's email address.
Note that the cc
command is not as commonly used as it once was, as many email clients and servers now provide built-in support for sending emails with multiple recipients. However, the cc
command can still be useful in certain situations, such as when you need to send an email to a large number of recipients or when you need to specify specific options for the email.