Re: envoyer un mail en ligne de commande

Page principale

Répondre à ce message
Auteur: Olivier Guerrier
Date:  
À: guilde
Sujet: Re: envoyer un mail en ligne de commande
guilde.dieudonne a écrit :
> A votre avis, existe t'il une solution simple


http://email.cleancode.org/

ça marche bien, et c'est GPL.
tu peux spécifier sur la ligne de commande le smtp à utiliser.

les options dispos pour situer le truc:

$ email -h
Options information is as follows
email [options] recipient1,recipient2,...

     -h, -help module          Print this message or specify one of the 
below opt                                              ions
     -q, -quiet                Suppress displayed messages (Good for cron)
     -f, -from-addr            Senders mail address
     -n, -from-name            Senders name
     -b, -blank-mail           Allows you to send a blank email
     -e, -encrypt              Encrypt the e-mail for first recipient 
before send                                              ing
     -s, -subject subject      Subject of message
     -r, -smtp-server server   Specify a temporary SMTP server for sending
     -p, -smtp-port port       Specify the SMTP port to connect to
     -a, -attach file,...      Attach N binary files and base64 encode
     -c, -conf-file file       Path to non-default configuration file
     -t, -check-config         Simply parse the email.conf file for errors
         -cc email,email,...   Copy recipients
         -bcc email,email,...  Blind Copy recipients
         -sign                 Sign the email with GPG
         -html                 Send message in HTML format ( Make your 
own HTML!                                               )
     -u, -smtp-user            Specify your username for SMTP AUTH
     -i, -smtp-pass            Specify your password for SMTP AUTH
     -g, -gpg-pass             Specify your password for GPG
         -high-priority        Send the email with high priority


HTH,

Olivier