I have a joomla site with Kunena installed on it. My users are not happy with the layout of the email sent to them from the forum.
Here is part of the code that is responsible for creating this email:
protected function createEmailBody($subscription, $subject, $url, $message, $once) {
$config = KunenaFactory::getConfig();
if ($subscription) {
$msg1 = $this->get ( 'parent' ) ? JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION1' ) : JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION1_CAT' );
$msg2 = $this->get ( 'parent' ) ? JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION2' ) : JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION2_CAT' );
} else {
$msg1 = JText::_ ( 'COM_KUNENA_POST_EMAIL_MOD1' );
$msg2 = JText::_ ( 'COM_KUNENA_POST_EMAIL_MOD2' );
}
$msg = $msg1 . " " . $config->board_title . "\n\n";
// DO NOT REMOVE EXTRA SPACE, JMailHelper::cleanBody() removes "Subject:" from the message body
$msg .= JText::_ ( 'COM_KUNENA_MESSAGE_SUBJECT' ) . " : " . $subject . "\n";
$msg .= JText::_ ( 'COM_KUNENA_CATEGORY' ) . " : " . $this->getCategory()->name . "\n";
$msg .= JText::_ ( 'COM_KUNENA_VIEW_POSTED' ) . " : " . $this->getAuthor()->getName('???', false) . "\n\n";
$msg .= "URL : $url\n\n";
if ($config->mailfull == 1) {
$msg .= JText::_ ( 'COM_KUNENA_MESSAGE' ) . " :\n-----\n";
$msg .= $message;
$msg .= "\n-----\n\n";
}
$msg .= $msg2 . "\n";
if ($subscription && $once) {
if ($this->parent) {
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION_MORE_READ' ) . "\n";
} else {
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION_MORE_SUBSCRIBE' ) . "\n";
}
}
$msg .= "\n";
$msg .= JText::_ ( 'COM_KUNENA_POST_EMAIL_NOTIFICATION3' ) . "\n";
return JMailHelper::cleanBody ( $msg );
}
So I decided to add an image as of the logo from my site to it at the bottom like this:
$msg .= ('<img src="http://mysite.me.ke/templates/jsn_nuru_free/images/colors/red/logo.png" width="100"/>');
butwhen the email was sent it returned the same thing I gave it
<img src="http://mysite.me.ke/templates/jsn_nuru_free/images/colors/red/logo.png" width="100"/>
so I thought I should use htmlspecialchars_decode() php function as in:
$msg .= htmlspecialchars_decode('<img src="http://mysite.me.ke/templates/jsn_nuru_free/images/colors/red/logo.png" width="100"/>');
But still I got nothing new. Kindly help me out!