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 @@ ...@@ -25,7 +25,7 @@
/** /**
* \file htdocs/lib/CMailFile.class.php * \file htdocs/lib/CMailFile.class.php
* \brief File of class to send emails (with attachments or not) * \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 Dan Potter.
* \author Eric Seigne * \author Eric Seigne
* \author Laurent Destailleur. * \author Laurent Destailleur.
...@@ -57,11 +57,6 @@ class CMailFile ...@@ -57,11 +57,6 @@ class CMailFile
var $smtps; // Contains SMTPs object (if this method is used) 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 //CSS
var $css; var $css;
//! Defined css style for body background //! Defined css style for body background
...@@ -87,6 +82,7 @@ class CMailFile ...@@ -87,6 +82,7 @@ class CMailFile
/** /**
* CMailFile * CMailFile
*
* @param subject Topic/Subject of mail * @param subject Topic/Subject of mail
* @param to Recipients emails (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]") * @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>[, ...]") * @param from Sender email (RFC 2822: "Nom prenom <email>[, ...]" ou "email[, ...]" ou "<email>[, ...]")
...@@ -107,10 +103,10 @@ class CMailFile ...@@ -107,10 +103,10 @@ class CMailFile
{ {
global $conf; global $conf;
// On definit fin de ligne // We define end of line (RFC 822bis section 2.3)
$this->eol="\n"; $this->eol="\r\n";
if (preg_match('/^win/i',PHP_OS)) $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"; //if (preg_match('/^mac/i',PHP_OS)) $this->eol="\r";
// On defini mixed_boundary // On defini mixed_boundary
$this->mixed_boundary = md5(uniqid("dolibarr1")); $this->mixed_boundary = md5(uniqid("dolibarr1"));
...@@ -465,7 +461,7 @@ class CMailFile ...@@ -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 * @param sourcefile
* @return <0 if KO, encoded string if OK * @return <0 if KO, encoded string if OK
...@@ -611,7 +607,7 @@ class CMailFile ...@@ -611,7 +607,7 @@ class CMailFile
/** /**
* Creation header MIME (mode = 'mail') * Create header MIME (mode = 'mail')
* *
* @param filename_list * @param filename_list
* @param mimefilename_list * @param mimefilename_list
...@@ -640,7 +636,7 @@ class CMailFile ...@@ -640,7 +636,7 @@ class CMailFile
} }
/** /**
* Permet d'ecrire le corps du message (mode = 'mail') * Return email content (mode = 'mail')
* *
* @param msgtext * @param msgtext
*/ */
...@@ -704,7 +700,7 @@ class CMailFile ...@@ -704,7 +700,7 @@ class CMailFile
} }
/** /**
* Permet d'attacher un fichier (mode = 'mail') * Attach file to email (mode = 'mail')
* *
* @param filename_list Tableau * @param filename_list Tableau
* @param mimetype_list Tableau * @param mimetype_list Tableau
...@@ -749,7 +745,7 @@ class CMailFile ...@@ -749,7 +745,7 @@ class CMailFile
/** /**
* Permet d'attacher une image (mode = 'mail') * Attach an image to email (mode = 'mail')
* *
* @param images_list Tableau * @param images_list Tableau
* @return out Chaine images encodees * @return out Chaine images encodees
...@@ -781,6 +777,7 @@ class CMailFile ...@@ -781,6 +777,7 @@ class CMailFile
/** /**
* Try to create a socket connection * Try to create a socket connection
*
* @param $host Add ssl:// for SSL/TLS. * @param $host Add ssl:// for SSL/TLS.
* @param $port Example: 25, 465 * @param $port Example: 25, 465
* @return Socket id if ok, 0 if KO * @return Socket id if ok, 0 if KO
...@@ -817,9 +814,9 @@ class CMailFile ...@@ -817,9 +814,9 @@ class CMailFile
} }
/** /**
* This function has been modified as provided * This function has been modified as provided by SirSir to allow multiline responses when
* by SirSir to allow multiline responses when
* using SMTP Extensions. * using SMTP Extensions.
*
* @param socket * @param socket
* @param response * @param response
* @return boolean * @return boolean
...@@ -848,9 +845,9 @@ class CMailFile ...@@ -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 * @return int >0 if OK, <0 if KO
*/ */
function findHtmlImages($images_dir) function findHtmlImages($images_dir)
...@@ -938,6 +935,7 @@ class CMailFile ...@@ -938,6 +935,7 @@ class CMailFile
/** /**
* Return an address for SMTP protocol * Return an address for SMTP protocol
*
* @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com' * @param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
* @param format 0=Auto, 1=emails with <>, 2=emails without <> * @param format 0=Auto, 1=emails with <>, 2=emails without <>
* @param encode 1=Encode name to RFC2822 * @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