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
364c2474
Commit
364c2474
authored
15 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: removed obsolete code
parent
e84a913a
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
+13
-43
13 additions, 43 deletions
htdocs/lib/CMailFile.class.php
with
13 additions
and
43 deletions
htdocs/lib/CMailFile.class.php
+
13
−
43
View file @
364c2474
<?php
/* Copyright (C) 2000-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -109,12 +110,6 @@ class CMailFile
// On defini alternative_boundary
$this
->
alternative_boundary
=
md5
(
uniqid
(
"dolibarr"
));
// Evite caractere bizarre avec les accents
//Todo l'envoi par mailing donne des caractres bizarre,
// alors que l'envoi d'un document facture ou autre est correcte
$subject
=
$subject
;
$from
=
$from
;
// If ending method not defined
if
(
empty
(
$conf
->
global
->
MAIN_MAIL_SENDMODE
))
$conf
->
global
->
MAIN_MAIL_SENDMODE
=
'mail'
;
...
...
@@ -215,7 +210,7 @@ class CMailFile
}
else
if
(
$conf
->
global
->
MAIN_MAIL_SENDMODE
==
'simplemail'
)
{
//
Todo:
Use simplemail library
// Use simplemail library
// ------------------------------------------
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/simplemail/class.mail.php"
);
...
...
@@ -229,58 +224,49 @@ class CMailFile
$mail
->
XMailer
=
"Dolibarr version "
.
DOL_VERSION
.
" (using simplemail)"
;
// A
jout de l'expediteur
// A
dd from
$this
->
addr_from
=
$from
;
//$this->splitAddress($from);
//$mail->addfrom($this->sEmail,$this->sName);
$mail
->
hfrom
=
$this
->
getValidAddress
(
$this
->
addr_from
,
0
,
1
);
// A
jout accuse
recept
ion
// A
dd delivery
rece
i
pt
if
(
$deliveryreceipt
)
{
//$mail->adddeliveryreceipt($this->sEmail,$this->sName);
$mail
->
deliveryreceipt
=
$this
->
getValidAddress
(
$this
->
addr_from
,
0
,
1
);
}
// A
jout du destinataire
// A
dd to
$arrayTo
=
split
(
','
,
$to
);
foreach
(
$arrayTo
as
$val
)
{
//$this->splitAddress($val);
//$mail->addrecipient($this->sEmail,$this->sName);
$mail
->
recipientlist
[]
=
array
(
'mail'
=>
$this
->
getValidAddress
(
$val
,
2
),
'nameplusmail'
=>
$this
->
getValidAddress
(
$val
,
0
,
1
));
}
// A
jout
carbon copy
// A
dd
carbon copy
if
(
!
empty
(
$addr_cc
))
{
$arrayTocc
=
split
(
','
,
$addr_cc
);
foreach
(
$arrayTocc
as
$val
)
{
//$this->splitAddress($val);
//$mail->addcc($this->sEmail,$this->sName);
if
(
!
empty
(
$mail
->
hcc
))
$mail
->
hcc
.
=
","
;
$mail
->
hcc
.
=
$this
->
getValidAddress
(
$val
,
0
,
1
);
}
}
// A
jout
carbon copy cache
// A
dd
carbon copy cache
if
(
!
empty
(
$addr_bcc
))
{
$arrayTobcc
=
split
(
','
,
$addr_bcc
);
foreach
(
$arrayTobcc
as
$val
)
{
//$this->splitAddress($val);
//$mail->addbcc($this->sEmail,$this->sName);
if
(
!
empty
(
$mail
->
hbcc
))
$mail
->
hbcc
.
=
","
;
$mail
->
hbcc
.
=
$this
->
getValidAddress
(
$val
,
0
,
1
);
}
}
//
ajout du
sujet
//
Add
su
b
je
c
t
$mail
->
addsubject
(
$this
->
encodetorfc2822
(
$subject
));
// A
jout du
message
// A
dd
message
if
(
$this
->
msgishtml
)
{
if
(
!
empty
(
$this
->
html
))
...
...
@@ -297,16 +283,16 @@ class CMailFile
}
}
}
//
le message
format
html
//
HTML
format
$mail
->
html
=
$msg
;
}
else
{
//
le message
format
text
//
Text
format
$mail
->
text
=
$msg
;
}
//
une piece jointe.
//
Attach-files
if
(
$this
->
atleastonefile
)
{
foreach
(
$filename_list
as
$i
=>
$val
)
...
...
@@ -945,22 +931,6 @@ class CMailFile
}
}
function
splitAddress
(
$address
)
{
if
(
eregi
(
'^(.*)<(.*)>$'
,
trim
(
$address
),
$regs
))
{
$this
->
sName
=
trim
(
utf8_decode
(
$regs
[
1
]));
$this
->
sEmail
=
trim
(
$regs
[
2
]);
}
else
{
$this
->
sName
=
''
;
$this
->
sEmail
=
$address
;
}
}
/**
* \brief Return an address for SMTP protocol
* \param adresses Example: 'John Doe <john@doe.com>' or 'john@doe.com'
...
...
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