Sending eMails in HTML Format

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
facternet
Posts: 1
Joined: Fri Oct 19, 2007 5:53 pm

Sending eMails in HTML Format

Post by facternet »

Hello.

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

Thanks.
Anthony.
arbolpalmerita
Posts: 4
Joined: Wed Dec 19, 2012 11:48 pm

Re: Sending eMails in HTML Format

Post 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.
srumberg
Posts: 41
Joined: Thu Feb 07, 2013 11:33 am

Re: Sending eMails in HTML Format

Post 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.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sending eMails in HTML Format

Post 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).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
TimPSNC
Posts: 41
Joined: Tue Jan 08, 2013 12:33 pm

Re: Sending eMails in HTML Format

Post 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.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sending eMails in HTML Format

Post by Klemen »

Running the message through the hesk_msgToPlain() function before sending it should do the trick.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
TimPSNC
Posts: 41
Joined: Tue Jan 08, 2013 12:33 pm

Re: Sending eMails in HTML Format

Post by TimPSNC »

Hmm, this is a bit beyond my limited capabilities. Do you have any coding for it?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sending eMails in HTML Format

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply