Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
1418f2e3
Commit
1418f2e3
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Try to fix crl-lf into emails
parent
147fabef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/lib/CMailFile.class.php
+17
-19
17 additions, 19 deletions
htdocs/lib/CMailFile.class.php
with
17 additions
and
19 deletions
htdocs/lib/CMailFile.class.php
+
17
−
19
View file @
1418f2e3
...
...
@@ -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.14
5
2011/07/
09 06:10:04 hregis
Exp $
* \version $Id: CMailFile.class.php,v 1.14
6
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
defin
it 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
defin
e 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
/**
* Creat
ion
header MIME (mode = 'mail')
* Creat
e
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment