Source for file module_mail.class.php
Documentation is available at module_mail.class.php
*@=@=@=@ START LICENSE @=@=@=@*
Copyright or © or Copr. Stéphane TRICHET and Nicolas SOTRON
stephane.t@simpliciweb.net and nicolas.s@simpliciweb.net
This software is a computer program whose purpose is to make a
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
*@=@=@=@ END LICENSE @=@=@=@*
* @version $Id: module_mail.class.php 606 2007-07-19 10:14:30Z stephanet $
* Require xPliciMail.class.php
require_once('xPliciMail.class.php');
* The module send mail to use
* @version $Id: module_mail.class.php 606 2007-07-19 10:14:30Z stephanet $
* Constructor, init the requests and objects
* send a email to $p_to from $p_header's email
* $p_html set the email in html
* @param string $p_subject
* @param string $p_header
function send($p_to, $p_subject, $p_body, $p_header, $p_body_type) {
// Header can have this form:
// -nicolas.s@simpliciweb.net
// -From: nicolas.s@simpliciweb.net
// -From: "Simpliciweb - Nicolas" <nicolas.s@simpliciweb.net>
// -From: "Ma Communauté" <nicolas.s@simpliciweb.net>
// Return-Path: nicolas.s@simpliciweb.net
// Date: Thu, 13 Jul 2006 09:27:54 +0000
// Content-Type: text/plain; charset=ISO-8859-15!!
// Select name and email from complete headers
// Select only From's line
$from_line = isset
($p_headers[0])?
$p_headers[0]:
'';
$nb_result =
preg_match('@"([^"]*)"@is',$from_line, $names);
// Delete '<' '>' aroud the email
$email_email =
$from_line;
return $this->xSend($p_body);
Documentation generated on Tue, 25 Mar 2008 15:35:19 +0100 by phpDocumentor 1.3.2