Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I have a small issue here, I have written a script and want to send a mail to some ID's if it fails. The mail command used is : ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    6

    Mails from Linux issue

    Hi,

    I have a small issue here, I have written a script and want to send a mail to some ID's if it fails. The mail command used is :

    mail -s "Synchronisation Process Failed." -c p.t@abc.com a_t@abc.com A_c@abc.com y_t@abc.com

    the issue here is, i need to send a mail TO "p.t@abc.com" and the other mail id's to be CCed.

    Please help !!

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    The mail manpage shows the syntax to be:

    mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr...

    So change your command to:

    mail -s "Synchronisation Process Failed." -c a_t@abc.com,A_c@abc.com,y_t@abc.com p.t@abc.com

    When you have more than one e-mail address specified for something like cc they have to be separate by commas.

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Posts
    6
    Thanks ..this did solve the issue

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...