Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
269
Issues
269
List
Boards
Labels
Service Desk
Milestones
Merge Requests
44
Merge Requests
44
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
692b8561
Commit
692b8561
authored
18 hours ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sandbox test
parent
95037825
fix/banned-email-noreply-867
1 merge request
!345
WIP: [Sprint/OldfashionedOwl](fix): Updated from address in ban email to info@minds.com
Pipeline
#89874542
canceled with stages
in 1 minute and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
Core/Channels/Ban.php
Core/Channels/Ban.php
+2
-2
Core/Email/Mailer.php
Core/Email/Mailer.php
+10
-3
Core/Queue/Runners/Email.php
Core/Queue/Runners/Email.php
+1
-1
No files found.
Core/Channels/Ban.php
View file @
692b8561
...
...
@@ -81,12 +81,12 @@ class Ban
*/
public
function
ban
(
$banReason
=
''
)
{
error_log
(
"ban called"
);
if
(
!
$this
->
user
)
{
throw
new
\Exception
(
'Missing User'
);
}
$banned
=
$this
->
banDelegate
->
ban
(
$this
->
user
,
$banReason
);
if
(
$banned
)
{
$this
->
logoutDelegate
->
logout
(
$this
->
user
);
$this
->
queueClient
...
...
This diff is collapsed.
Click to expand it.
Core/Email/Mailer.php
View file @
692b8561
...
...
@@ -48,11 +48,18 @@ class Mailer
*/
public
function
send
(
$message
)
{
$fromName
=
$message
->
from
[
'name'
]
??
'Minds'
;
$this
->
mailer
->
ClearAllRecipients
();
$this
->
mailer
->
ClearAttachments
();
$this
->
mailer
->
setFrom
(
$message
->
from
[
'email'
],
$message
->
from
[
'name'
]);
$this
->
mailer
->
addReplyTo
(
$message
->
from
[
'email'
],
$message
->
from
[
'name'
]);
$this
->
mailer
->
From
=
$message
->
from
[
'email'
];
error_log
(
var_export
(
$message
->
from
,
true
));
if
(
isset
(
$message
->
from
))
{
$this
->
mailer
->
ClearReplyTos
();
$this
->
mailer
->
addReplyTo
(
$message
->
from
[
'email'
],
$fromName
);
}
$this
->
mailer
->
setFrom
(
$message
->
from
[
'email'
],
$fromName
);
foreach
(
$message
->
to
as
$to
)
{
if
(
$this
->
filter
->
isSpam
(
$to
[
'email'
]))
{
...
...
This diff is collapsed.
Click to expand it.
Core/Queue/Runners/Email.php
View file @
692b8561
...
...
@@ -27,7 +27,7 @@ class Email implements Interfaces\QueueRunner
$message
=
unserialize
(
$data
[
'message'
]);
$mailer
->
send
(
$message
);
echo
"[
priority
email]: delivered to
{
$message
->
to
[
0
][
'name'
]
}
(
$message->subject
)
\n
"
;
echo
"[email]: delivered to
{
$message
->
to
[
0
][
'name'
]
}
(
$message->subject
)
\n
"
;
});
$this
->
run
();
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment