Skip to content
Snippets Groups Projects
Commit 1418f2e3 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Try to fix crl-lf into emails

parent 147fabef
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
/**
* \file htdocs/lib/CMailFile.class.php
* \brief File of class to send emails (with attachments or not)
* \version $Id: CMailFile.class.php,v 1.145 2011/07/09 06:10:04 hregis Exp $
* \version $Id: CMailFile.class.php,v 1.146 2011/07/20 11:07:12 eldy Exp $
* \author Dan Potter.
* \author Eric Seigne
* \author Laurent Destailleur.
......@@ -57,11 +57,6 @@ class CMailFile
var $smtps; // Contains SMTPs object (if this method is used)
// simplemail
//var $simplemail; // Contains simplemail object (if this method is used)
//var $sName;
//var $sEmail;
//CSS
var $css;
//! Defined css style for body background
......@@ -87,6 +82,7 @@ class CMailFile
/**
* CMailFile
*
* @param subject Topic/Subject of mail
* @param to Recipients emails (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
* @param from Sender email (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
......@@ -107,10 +103,10 @@ class CMailFile
{
global $conf;
// On definit fin de ligne
$this->eol="\n";
if (preg_match('/^win/i',PHP_OS)) $this->eol="\r\n";
if (preg_match('/^mac/i',PHP_OS)) $this->eol="\r";
// We define end of line (RFC 822bis section 2.3)
$this->eol="\r\n";
//if (preg_match('/^win/i',PHP_OS)) $this->eol="\r\n";
//if (preg_match('/^mac/i',PHP_OS)) $this->eol="\r";
// On defini mixed_boundary
$this->mixed_boundary = md5(uniqid("dolibarr1"));
......@@ -465,7 +461,7 @@ class CMailFile
}
/**
* Read a file on disk and return encoded content for emails
* Read a file on disk and return encoded content for emails (mode = 'mail')
*
* @param sourcefile
* @return <0 if KO, encoded string if OK
......@@ -611,7 +607,7 @@ class CMailFile
/**
* Creation header MIME (mode = 'mail')
* Create header MIME (mode = 'mail')
*
* @param filename_list
* @param mimefilename_list
......@@ -640,7 +636,7 @@ class CMailFile
}
/**
* Permet d'ecrire le corps du message (mode = 'mail')
* Return email content (mode = 'mail')
*
* @param msgtext
*/
......@@ -704,7 +700,7 @@ class CMailFile
}
/**
* Permet d'attacher un fichier (mode = 'mail')
* Attach file to email (mode = 'mail')
*
* @param filename_list Tableau
* @param mimetype_list Tableau
......@@ -749,7 +745,7 @@ class CMailFile
/**
* Permet d'attacher une image (mode = 'mail')
* Attach an image to email (mode = 'mail')
*
* @param images_list Tableau
* @return out Chaine images encodees
......@@ -781,6 +777,7 @@ class CMailFile
/**
* Try to create a socket connection
*
* @param $host Add ssl:// for SSL/TLS.
* @param $port Example: 25, 465
* @return Socket id if ok, 0 if KO
......@@ -817,9 +814,9 @@ class CMailFile
}
/**
* This function has been modified as provided
* by SirSir to allow multiline responses when
* This function has been modified as provided by SirSir to allow multiline responses when
* using SMTP Extensions.
*
* @param socket
* @param response
* @return boolean
......@@ -848,9 +845,9 @@ class CMailFile
}
/**
* Recherche la presence d'images dans le message html
* Seearch images into html message and init array this->images_encoded if found
*
* @param images_dir Emplacement des images
* @param images_dir Location of physical images files
* @return int >0 if OK, <0 if KO
*/
function findHtmlImages($images_dir)
......@@ -938,6 +935,7 @@ class CMailFile
/**
* Return an address for SMTP protocol
*
* @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
* @param format 0=Auto, 1=emails with <>, 2=emails without <>
* @param encode 1=Encode name to RFC2822
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment