Page 1 of 1

Email Templates

Posted: 12 Sep 2017, 00:40
by MaxLA1990
Can anyone give me any pointers on how to create a signature block in an email, with my company logo and linked/twitter icons (all containing hyperlinks)? I try to cut and paste the logos, but they display as blank boxes.

Re: Email Templates

Posted: 12 Sep 2017, 09:01
by dveos
I use CKeditor Templates add on, fairly straight forward to set up, and there are tutorials available.

I've been using the emails through OpenCATS quite extensively and did have to modify core files to get outgoing HTML emails to display correctly.

Re: Email Templates

Posted: 12 Sep 2017, 20:42
by nicklarge1973
Dveos,

What changes did you need to make to your implementation of the opencats system in order to allow for HTML ?

Thanks in advance! Nick.

Re: Email Templates

Posted: 13 Sep 2017, 01:06
by MaxLA1990
I think I have managed to overcome this problem, by copying and pasting my signature block into the "paste from Word" option. Still having an issue with double spacing. Any email I send is double spaced, even if when I typed it, it is single space (my preference).

Re: Email Templates

Posted: 13 Sep 2017, 17:27
by dveos
Hi, I installed the latest version of CKEditor with the add ons that best matched my requirements, Templates, Tables as examples.

Then I had to modify SendEmail.tpl under the modules/candidates directory and also Mailer.php file under lib directory.

SendEmail.tpl - line 122 I changed to:-
Code: Select all
var tags = ['p', 'ol', 'ul', 'li', 'tr', 'td', 'table', 'tbody']; // etc.
Here you can add other tags that you are looking to send in your email that are causing issues.

Mailer.php - from line 211 I changed to (which matched the style I was looking for):
Code: Select all
$this->_mailer->Body = '<div style="font: normal normal 11px Calibri, sans-serif;"><style> @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} p {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-fareast-language:EN-GB;}</style>'
                . str_replace('<br>', "<br />\n", str_replace('<br />', '<br>', str_replace("\n", "<br>", $body))) . '</p></div>';

            $this->_mailer->AltBody = strip_tags($body);
        }
Can't remember if I edited any other files but should be it!?

Re: Email Templates

Posted: 23 Sep 2017, 12:49
by cptr13
Just adding this as a reminder to add to documentation.