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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
c5effe4c
Commit
c5effe4c
authored
16 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Pb in error management
parent
49d8233e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/includes/simplemail/class.mail.php
+130
-124
130 additions, 124 deletions
htdocs/includes/simplemail/class.mail.php
with
130 additions
and
124 deletions
htdocs/includes/simplemail/class.mail.php
+
130
−
124
View file @
c5effe4c
...
@@ -321,7 +321,9 @@ class simplemail {
...
@@ -321,7 +321,9 @@ class simplemail {
case
'php'
:
$this
->
phpmail
();
break
;
case
'php'
:
$this
->
phpmail
();
break
;
case
'socket'
:
$this
->
socketmailloop
();
break
;
case
'socket'
:
$this
->
socketmailloop
();
break
;
}
}
return
TRUE
;
// DOLCHANGE LDR
return
(
empty
(
$this
->
error_log
)
?
TRUE
:
FALSE
);
}
}
// Mail send by PHPmail
// Mail send by PHPmail
...
@@ -330,9 +332,10 @@ class simplemail {
...
@@ -330,9 +332,10 @@ class simplemail {
while
(
list
(
$key
,
$to
)
=
each
(
$this
->
recipientlist
)
)
{
while
(
list
(
$key
,
$to
)
=
each
(
$this
->
recipientlist
)
)
{
$this
->
recipient
=
$to
[
'mail'
];
$this
->
recipient
=
$to
[
'mail'
];
if
(
mail
(
$to
[
'mail'
],
$this
->
subject
,
$this
->
body
,
$this
->
makeheader
()
)
)
{
if
(
mail
(
$to
[
'mail'
],
$this
->
subject
,
$this
->
body
,
$this
->
makeheader
()
)
)
{
$this
->
error_log
(
"envoie vers
{
$to
[
'nameplusmail'
]
}
russi"
);
// DOLCHANGE LDR Comment this to have no error when no error !
//$this->error_log("envoie vers {$to['nameplusmail']} reussi");
}
else
{
}
else
{
$this
->
error_log
(
"envoie vers
{
$to
[
'nameplusmail'
]
}
echou"
);
$this
->
error_log
(
"envoie vers
{
$to
[
'nameplusmail'
]
}
echou
e
"
);
}
}
}
}
return
TRUE
;
return
TRUE
;
...
@@ -354,7 +357,8 @@ class simplemail {
...
@@ -354,7 +357,8 @@ class simplemail {
function
SocketSend
(
$in
,
$wait
=
''
)
{
function
SocketSend
(
$in
,
$wait
=
''
)
{
fputs
(
$this
->
connect
,
$in
,
strlen
(
$in
));
fputs
(
$this
->
connect
,
$in
,
strlen
(
$in
));
echo
"-"
;
flush
();
//echo $in;
//flush();
if
(
empty
(
$wait
))
{
if
(
empty
(
$wait
))
{
$rcv
=
fgets
(
$this
->
connect
,
1024
);
$rcv
=
fgets
(
$this
->
connect
,
1024
);
return
$rcv
;
return
$rcv
;
...
@@ -375,7 +379,8 @@ class simplemail {
...
@@ -375,7 +379,8 @@ class simplemail {
function
socketmailsend
(
$to
)
{
function
socketmailsend
(
$to
)
{
$this
->
recipient
=
$to
;
$this
->
recipient
=
$to
;
$this
->
error_log
(
"Socket vers
$to
"
);
// DOLCHANGE LDR To have no error when no error
//$this->error_log("Socket vers $to");
$this
->
SocketSend
(
"MAIL FROM:
{
$this
->
hfrom
}
\r\n
"
);
$this
->
SocketSend
(
"MAIL FROM:
{
$this
->
hfrom
}
\r\n
"
);
$this
->
SocketSend
(
"RCPT TO:
$to
\r\n
"
);
$this
->
SocketSend
(
"RCPT TO:
$to
\r\n
"
);
...
@@ -385,7 +390,8 @@ class simplemail {
...
@@ -385,7 +390,8 @@ class simplemail {
$this
->
SocketSend
(
".
\r\n
"
);
$this
->
SocketSend
(
".
\r\n
"
);
$this
->
SocketSend
(
"RSET
\r\n
"
);
$this
->
SocketSend
(
"RSET
\r\n
"
);
$this
->
error_log
(
"Fin de l'envoi vers
$to
"
);
// DOLCHANGE LDR To have no error when no error
//$this->error_log("Fin de l'envoi vers $to");
return
TRUE
;
return
TRUE
;
}
}
...
...
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