Skip to content

Commit 8849426

Browse files
committed
Substitute subject, from name
1 parent 10bc55b commit 8849426

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

trunk/mailer.http.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ function sparkpostSend()
4848
protected function get_request_body()
4949
{
5050
$tracking_enabled = !!$this->options['enable_tracking'];
51-
51+
$sender = $this->get_sender();
5252
$body = array(
5353
'recipients' => $this->get_recipients(),
5454
'content' => array(
55-
'from' => $this->get_sender(),
55+
'from' => $sender,
5656
'subject' => $this->Subject,
5757
'headers' => $this->get_headers()
5858
),
@@ -65,6 +65,8 @@ protected function get_request_body()
6565
if (!empty($this->options['template'])) {
6666
$body['content']['template_id'] = $this->options['template'];
6767
$body['substitution_data']['content'] = $this->Body;
68+
$body['substitution_data']['subject'] = $this->Subject;
69+
$body['substitution_data']['from_name'] = $sender['name'];
6870
} else {
6971
switch($this->ContentType) {
7072
case 'multipart/alternative':

0 commit comments

Comments
 (0)