2010-04-12 12:38:32 +02:00
|
|
|
<sect2 id="config-LSaddon_mail">
|
|
|
|
<title>LSaddon_mail</title>
|
|
|
|
<para>Cet &LSaddon; est utilisé pour gérer l'envoie de mail. Le module
|
2020-04-29 15:26:15 +02:00
|
|
|
&PEAR; Mail doit être installé. Il doit être configuré en éditant son
|
2010-04-12 12:38:32 +02:00
|
|
|
fichier de configuration <literal>config.LSaddons.mail.php</literal>.</para>
|
2020-04-29 15:26:15 +02:00
|
|
|
|
2010-04-12 12:38:32 +02:00
|
|
|
<programlisting linenumbering="unnumbered">
|
2017-06-15 18:47:28 +02:00
|
|
|
<citetitle>Structure du fichier</citetitle>/*
|
2010-04-12 12:38:32 +02:00
|
|
|
***********************************************
|
|
|
|
* Configuration du support de l'envoi de mail *
|
|
|
|
***********************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Pear :: Mail
|
|
|
|
define('PEAR_MAIL','/usr/share/php/Mail.php');
|
|
|
|
|
2020-04-29 15:26:15 +02:00
|
|
|
// Pear :: Mail_mime
|
|
|
|
define('PEAR_MAIL_MIME','/usr/share/php/Mail/mime.php');
|
|
|
|
|
2010-04-12 12:38:32 +02:00
|
|
|
/*
|
|
|
|
* Méthode d'envoie :
|
|
|
|
* - mail : envoie avec la méthode PHP mail()
|
|
|
|
* - sendmail : envoie la commande sendmail du système
|
|
|
|
* - smtp : envoie en utilisant un serveur SMTP
|
|
|
|
*/
|
|
|
|
define('MAIL_SEND_METHOD','smtp');
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Paramètres d'envoie :
|
|
|
|
* Ces paramètres dépende de la méthode utilisé. Repporté vous à la documentation
|
|
|
|
* de PEAR :: Mail pour plus d'information.
|
|
|
|
* Lien : http://pear.php.net/manual/en/package.mail.mail.factory.php
|
2020-04-29 15:26:15 +02:00
|
|
|
* Infos :
|
2010-04-12 12:38:32 +02:00
|
|
|
* List of parameter for the backends
|
|
|
|
* mail
|
2020-04-29 15:26:15 +02:00
|
|
|
* o If safe mode is disabled, $params will be passed as the fifth
|
|
|
|
* argument to the PHP mail() function. If $params is an array,
|
|
|
|
* its elements will be joined as a space-delimited string.
|
2010-04-12 12:38:32 +02:00
|
|
|
* sendmail
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["sendmail_path"] - The location of the sendmail program
|
2010-04-12 12:38:32 +02:00
|
|
|
* on the filesystem. Default is /usr/bin/sendmail.
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["sendmail_args"] - Additional parameters to pass to the
|
|
|
|
* sendmail. Default is -i.
|
2010-04-12 12:38:32 +02:00
|
|
|
* smtp
|
|
|
|
* o $params["host"] - The server to connect. Default is localhost.
|
|
|
|
* o $params["port"] - The port to connect. Default is 25.
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["auth"] - Whether or not to use SMTP authentication.
|
2010-04-12 12:38:32 +02:00
|
|
|
* Default is FALSE.
|
|
|
|
* o $params["username"] - The username to use for SMTP authentication.
|
|
|
|
* o $params["password"] - The password to use for SMTP authentication.
|
|
|
|
* o $params["localhost"] - The value to give when sending EHLO or HELO.
|
|
|
|
* Default is localhost
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["timeout"] - The SMTP connection timeout.
|
2010-04-12 12:38:32 +02:00
|
|
|
* Default is NULL (no timeout).
|
|
|
|
* o $params["verp"] - Whether to use VERP or not. Default is FALSE.
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["debug"] - Whether to enable SMTP debug mode or not.
|
2010-04-12 12:38:32 +02:00
|
|
|
* Default is FALSE.
|
2020-04-29 15:26:15 +02:00
|
|
|
* o $params["persist"] - Indicates whether or not the SMTP connection
|
2010-04-12 12:38:32 +02:00
|
|
|
* should persist over multiple calls to the send() method.
|
|
|
|
*/
|
|
|
|
$MAIL_SEND_PARAMS = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Headers :
|
|
|
|
*/
|
|
|
|
$MAIL_HEARDERS = array(
|
|
|
|
);
|
|
|
|
</programlisting>
|
|
|
|
|
|
|
|
<para>Cet &LSaddon; offre la possibilité d'utilisé la fonction &php;
|
|
|
|
<function>sendMail()</function>.
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>bool <function>sendMail</function></funcdef>
|
|
|
|
<paramdef>string <parameter>$to</parameter></paramdef>
|
|
|
|
<paramdef>string <parameter>$subject</parameter></paramdef>
|
|
|
|
<paramdef>string <parameter>$msg</parameter></paramdef>
|
|
|
|
<paramdef>array <parameter>$headers</parameter></paramdef>
|
2020-04-29 15:26:15 +02:00
|
|
|
<paramdef>array <parameter>$attachments</parameter></paramdef>
|
|
|
|
<paramdef>string <parameter>$eol</parameter></paramdef>
|
|
|
|
<paramdef>string <parameter>$encoding</parameter></paramdef>
|
2010-04-12 12:38:32 +02:00
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
</para>
|
|
|
|
</sect2>
|