Page 1 of 1

Sending eMails in HTML Format

Posted: Fri Oct 19, 2007 5:55 pm
by facternet
Hello.

Does anyone know if it's possible to send the e-mails to users in HTML format?

Thanks.
Anthony.

Re: Sending eMails in HTML Format

Posted: Fri Jan 04, 2013 4:45 pm
by arbolpalmerita
facternet wrote:Hello.

Does anyone know if it's possible to send the e-mails to users in HTML format?

Thanks.
Anthony.

hello!!

find all "text/plain" in inc\email_functions.inc.php
and replace it for "text/html" next, modifying your email template in \language\**\emails

works!!!

true history.

Re: Sending eMails in HTML Format

Posted: Sun Feb 17, 2013 5:41 pm
by srumberg
Thanks for posting this.

Klemen -- it would be nice to make it a user-configurable option in the settings: send email format: HTML or Plain text.

With HTML, it would be GREAT to use the text editor that you have for the Articles, so that outbound messages could be nicely formatted.

Re: Sending eMails in HTML Format

Posted: Mon Feb 18, 2013 9:46 am
by Klemen
I do plan to enable HTML emails (as an option of course), but I'm afraid probably not in 2.5 yet. This will most likely need to wait for UI upgrade (HESK 3.x).

Re: Sending eMails in HTML Format

Posted: Fri Feb 22, 2013 9:37 am
by TimPSNC
Is there a way of keeping the text entered in the message field on admin_ticket.php as plain text, and the actual email html- probably by automatically formatting the plain message into html automatically when sending the email?

By just changing the settings in inc\email_functions.inc.php, the message entered by the staff member is formatted as html and so line breaks etc aren't preserved, unless they format it manually into html. In the absence of an html editor, I would like to keep the message entered as it is and add it to an html signature/email.

Re: Sending eMails in HTML Format

Posted: Fri Feb 22, 2013 5:16 pm
by Klemen
Running the message through the hesk_msgToPlain() function before sending it should do the trick.

Re: Sending eMails in HTML Format

Posted: Mon Feb 25, 2013 9:38 am
by TimPSNC
Hmm, this is a bit beyond my limited capabilities. Do you have any coding for it?

Re: Sending eMails in HTML Format

Posted: Mon Feb 25, 2013 3:53 pm
by Klemen
What you can try is modifying this in inc/posting_functions.inc.php

Code: Select all

'message'		=> hesk_msgToPlain($ticket['message'], 1),
to just

Code: Select all

'message'		=> $ticket['message'],
(disregard my previous post, it's the other way around - the message shouldn't be run through msgToPlain if you want to keep HTML)

I'm afraid that as much help I can give for unsupported features such as sending HTML emails.