Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sparkpost
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
sparkpost
Commits
af9e0e00
Commit
af9e0e00
authored
3 months ago
by
Eirik Morland
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3422111
by eiriksm: PHPCS issues for 3.x
parent
b5ea0d07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Resolve #3422111 "Phpcs issues for"
Pipeline
#335314
failed
3 months ago
Stage: build
Stage: validate
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ClientService.php
+1
-0
1 addition, 0 deletions
src/ClientService.php
src/Form/TestMailForm.php
+1
-1
1 addition, 1 deletion
src/Form/TestMailForm.php
src/Plugin/Mail/SparkpostMail.php
+3
-3
3 additions, 3 deletions
src/Plugin/Mail/SparkpostMail.php
with
5 additions
and
4 deletions
src/ClientService.php
+
1
−
0
View file @
af9e0e00
...
...
@@ -52,6 +52,7 @@ class ClientService implements ClientServiceInterface {
* of php guzzle adapter library.
*
* @return string
* The class name for the class we want to use.
*/
protected
function
getHttpClientAdapterClass
()
{
if
(
class_exists
(
static
::
GUZZLE6_ADAPTER
))
{
...
...
This diff is collapsed.
Click to expand it.
src/Form/TestMailForm.php
+
1
−
1
View file @
af9e0e00
...
...
@@ -9,8 +9,8 @@ use Drupal\Core\Language\LanguageInterface;
use
Drupal\Core\Mail\MailManagerInterface
;
use
Drupal\Core\Session\AccountInterface
;
use
Drupal\Core\Url
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Drupal\sparkpost\ClientService
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
/**
* The form for sending test mails from Sparkpost.
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Mail/SparkpostMail.php
+
3
−
3
View file @
af9e0e00
...
...
@@ -67,7 +67,7 @@ class SparkpostMail implements MailInterface {
// Prepare headers, defaulting the reply-to to the from address since
// Sparkpost needs the from address to be configured separately.
// Note that only Reply-To and X-* headers are allowed.
$headers
=
isset
(
$message
[
'headers'
]
)
?
$message
[
'headers'
]
:
[];
$headers
=
$message
[
'headers'
]
?
?
[];
if
(
isset
(
$message
[
'params'
][
'sparkpost'
][
'header'
]))
{
$headers
=
$message
[
'params'
][
'sparkpost'
][
'header'
]
+
$headers
;
}
...
...
@@ -87,7 +87,7 @@ class SparkpostMail implements MailInterface {
}
$to
=
array_merge
(
$to
,
$cc
,
$bcc
);
$reply_to
=
isset
(
$headers
[
'Reply-To'
]
)
?
$headers
[
'Reply-To'
]
:
NULL
;
$reply_to
=
$headers
[
'Reply-To'
]
?
?
NULL
;
$headers
=
$this
->
allowedHeaders
(
$headers
);
// Prepare attachments.
...
...
@@ -103,7 +103,7 @@ class SparkpostMail implements MailInterface {
// @todo Check what the mime-mail situation in d8 is, and add fallback for
// that here.
$plain_text
=
empty
(
$message
[
'params'
][
'plaintext'
])
?
MailFormatHelper
::
htmlToText
(
$message
[
'body'
])
:
$message
[
'params'
][
'plaintext'
];
$overrides
=
isset
(
$message
[
'params'
][
'sparkpost'
][
'overrides'
]
)
?
$message
[
'params'
][
'sparkpost'
][
'overrides'
]
:
[];
$overrides
=
$message
[
'params'
][
'sparkpost'
][
'overrides'
]
?
?
[];
$sparkpost_message
=
$overrides
+
[
'content'
=>
[
'from'
=>
[
...
...
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