+ Responder ao Tópico



  1. #1

    Padrão email

    pessoal sou iniciante no linux, gostaria de saber como usar o comando mail ja procurei no google mas tudo q eu encontrei nao deu certo, o q to querendo e criar um script q em determinada hora compacte um arquivo e envie esse para meu email, alguem pode me ajudar??

  2. #2

    Padrão email

    Acho que ta respondido.. Valeu..
    Só procurei na google.

    Sending e-mail using shell scripts
    Most script programmers already know how easy it is to send e-mail from within shell scripts. A simple invocation of the mail program with the recipient for a command line argument will send all data read from standard input:

    $ mail root < /tmp/db_reorg.log
    $ echo "Coming home for dinner!" | mail [email protected]

    The "mail" command accepts additional command line parameters, e.g.

    -s subject Use subject for the e-mail title
    -c address Send copy of the mail to the specified address
    -b address Send blind carbon copy to specified address

    Some common usage examples:

    Send a log file to the system administrator:
    # mail -s "Reorganization completed" root < db_reorg.log

    Send mail to "mark" with copy to "john":
    $ echo "John's coming with us" |
    mail -c john -s "Join us watching Star Wars" mark

    Portability

    Note that not all mail commands have an "-s" option to specify a mail subject. Sometimes an extended version of the mail command is available with the name "mailx", e.g. /usr/ucb/mailx, or "Mail" (with a capital "M").

    But how can we "attach" a file to a mail? We know that newer mail readers like Mozilla, Netscape Messenger or Microsoft Exchange have a way of displaying file attachments, e.g. images, ZIP files or audio files. How can we send some mail text (e.g. "See this picture of me surfing!") together with a binary file (e.g. "surfing.jpeg")?
    :toim:



  3. #3

    Padrão email

    este email pode ser qualquer um por exemplo o do gmail???