diff --git a/application/controllers/ViewMessage.php b/application/controllers/ViewMessage.php index a7f588dba..876bc0913 100644 --- a/application/controllers/ViewMessage.php +++ b/application/controllers/ViewMessage.php @@ -23,6 +23,9 @@ class ViewMessage extends CI_Controller { parent::__construct(); + // Loading config file message + $this->config->load('message'); + // Load model MessageToken_model $this->load->model('system/MessageToken_model', 'MessageTokenModel'); } @@ -39,7 +42,8 @@ class ViewMessage extends CI_Controller if (is_array($msg->retval) && count($msg->retval) > 0) { $data = array ( - 'message' => $msg->retval[0] + 'message' => $msg->retval[0], + 'href' => $this->ci->config->item('message_html_view_url') ); $this->load->view('system/messageHTML.php', $data); diff --git a/application/libraries/MessageLib.php b/application/libraries/MessageLib.php index 399b16391..0d80b3495 100644 --- a/application/libraries/MessageLib.php +++ b/application/libraries/MessageLib.php @@ -287,7 +287,7 @@ class MessageLib * @param integer $priority * @return array */ - public function sendMessageVorlage($sender_id, $receiver_id, $vorlage_kurzbz, $oe_kurzbz, $data, $relationmessage_id = null, $orgform_kurzbz = null, $multiPartMime = true) + public function sendMessageVorlage($sender_id, $receiver_id, $vorlage_kurzbz, $oe_kurzbz, $data, $relationmessage_id = null, $orgform_kurzbz = null) { if (!is_numeric($sender_id)) { @@ -437,13 +437,14 @@ class MessageLib // If the person has an email account if (!is_null($result->retval[$i]->receiver) && $result->retval[$i]->receiver != '') { - $href = APP_ROOT . $this->ci->config->item('redirect_view_message_url') . $result->retval[$i]->token; + $href = APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token; // Using a template for the html email body $body = $this->ci->parser->parse( 'templates/mailHTML', array( - 'src' => APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[$i]->token, - 'href' => $href + 'href' => $href, + 'subject' => $result->retval[0]->subject, + 'body' => $result->retval[0]->body ), true ); @@ -456,7 +457,9 @@ class MessageLib $altBody = $this->ci->parser->parse( 'templates/mailTXT', array( - 'href' => $href + 'href' => $href, + 'subject' => $result->retval[0]->subject, + 'body' => $result->retval[0]->body ), true ); @@ -569,12 +572,13 @@ class MessageLib if ($multiPartMime === true) { // Using a template for the html email body - $href = APP_ROOT . $this->ci->config->item('redirect_view_message_url') . $result->retval[0]->token; + $href = APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token; $bodyMsg = $this->ci->parser->parse( 'templates/mailHTML', array( - 'src' => APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token, - 'href' => $href + 'href' => $href, + 'subject' => $result->retval[0]->subject, + 'body' => $result->retval[0]->body ), true ); @@ -588,7 +592,9 @@ class MessageLib $altBody = $this->ci->parser->parse( 'templates/mailTXT', array( - 'href' => $href + 'href' => $href, + 'subject' => $result->retval[0]->subject, + 'body' => $result->retval[0]->body ), true ); diff --git a/application/views/system/messageHTML.php b/application/views/system/messageHTML.php index 7a005a228..bc8d4b06a 100644 --- a/application/views/system/messageHTML.php +++ b/application/views/system/messageHTML.php @@ -3,4 +3,7 @@
B: body; ?> +
+
+ Reply
\ No newline at end of file diff --git a/application/views/templates/mailHTML.php b/application/views/templates/mailHTML.php index 2b17ad697..b774e01a8 100644 --- a/application/views/templates/mailHTML.php +++ b/application/views/templates/mailHTML.php @@ -3,17 +3,10 @@ This is not the email template, this is a tribute -
- This is the header! -
- - Click here!!! + Click here to see the message
- \ No newline at end of file diff --git a/application/views/templates/mailTXT.php b/application/views/templates/mailTXT.php index c2a0801fc..cd55aeb06 100644 --- a/application/views/templates/mailTXT.php +++ b/application/views/templates/mailTXT.php @@ -1 +1,3 @@ -Click here!!!! >>>> {href} <<<<< \ No newline at end of file +Follow the following link to read the message. + +{href} \ No newline at end of file