Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-orchestrator
Commits
761c1b2b
Commit
761c1b2b
authored
1 month ago
by
Oana-Eliza Alexa
Browse files
Options
Download
Patches
Plain Diff
fix indent
parent
cfecbfdf
79-redesign-mail
1 merge request
!75
Draft: Resolve "Redesign Mail"
Pipeline
#32358
failed with stages
in 16 seconds
This commit is part of merge request
!75
. Comments created here will be created in the context of that merge request.
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/tasks/Mail.php
+24
-24
plugins/tasks/Mail.php
with
24 additions
and
24 deletions
+24
-24
plugins/tasks/Mail.php
+
24
−
24
Edit
View file @
761c1b2b
...
...
@@ -110,38 +110,38 @@ class Mail implements EndpointInterface
private
function
sendMail
(
$setFrom
,
$setBCC
,
$recipients
,
$body
,
$signature
,
$subject
,
$receipt
,
$attachments
)
{
// Required before passing the array to the constructor mail.
if
(
empty
(
$attachments
))
{
$attachments
=
NULL
;
}
if
(
empty
(
$attachments
))
{
$attachments
=
NULL
;
}
$mail_controller
=
new
\
FusionDirectory\Mail\MailLib
(
$setFrom
,
$setBCC
,
$recipients
,
$body
,
$signature
,
$subject
,
$receipt
,
$attachments
);
$mail_controller
=
new
\
FusionDirectory\Mail\MailLib
(
$setFrom
,
$setBCC
,
$recipients
,
$body
,
$signature
,
$subject
,
$receipt
,
$attachments
);
return
$mail_controller
->
sendMail
();
}
private
function
updateResult
(
array
$mailSentResult
,
$task
,
$fdTasksConf
):
array
{
$result
=
[];
if
(
$mailSentResult
[
0
]
==
"SUCCESS"
)
{
// The third arguments "2" is the status code of success for mail as of now 18/11/22
$result
[
'statusUpdate'
]
=
$this
->
gateway
->
updateTaskStatus
(
$task
[
"dn"
],
$task
[
"cn"
][
0
],
"2"
);
$result
[
'mailStatus'
]
=
'mail : '
.
$task
[
"dn"
]
.
' was successfully sent'
;
$result
[
'updateLastMailExec'
]
=
$this
->
gateway
->
updateLastMailExecTime
(
$fdTasksConf
[
0
][
"dn"
]);
}
else
{
$result
[
'statusUpdate'
]
=
$this
->
gateway
->
updateTaskStatus
(
$task
[
"dn"
],
$task
[
"cn"
][
0
],
$mailSentResult
[
0
]);
$result
[
'Error'
]
=
$mailSentResult
;
}
$result
=
[];
if
(
$mailSentResult
[
0
]
==
"SUCCESS"
)
{
// The third arguments "2" is the status code of success for mail as of now 18/11/22
$result
[
'statusUpdate'
]
=
$this
->
gateway
->
updateTaskStatus
(
$task
[
"dn"
],
$task
[
"cn"
][
0
],
"2"
);
$result
[
'mailStatus'
]
=
'mail : '
.
$task
[
"dn"
]
.
' was successfully sent'
;
$result
[
'updateLastMailExec'
]
=
$this
->
gateway
->
updateLastMailExecTime
(
$fdTasksConf
[
0
][
"dn"
]);
}
else
{
$result
[
'statusUpdate'
]
=
$this
->
gateway
->
updateTaskStatus
(
$task
[
"dn"
],
$task
[
"cn"
][
0
],
$mailSentResult
[
0
]);
$result
[
'Error'
]
=
$mailSentResult
;
}
return
$result
;
return
$result
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets