Page 1 of 1

HTML email format?

Posted: Wed Jun 17, 2009 9:03 am
by mosh
/*************************************
Title: GoMidjets
Version: 1.0
Author:
Demo:
Download:
Website: http://gomidjets.com

Short description:


*************************************/

(Here below you can write additional info, longer description and comments)

Hello,
I'm new to Hesk.
Is it possible that the email which is sent to submitter will be in HTML format ?

Thanks

Posted: Wed Jun 17, 2009 6:57 pm
by Klemen
Possible yes, but would need quite some editing and is out of the scope of my support here. I will consider adding HTML mails to Hesk in the future though.

As for your attachments problem, see
viewtopic.php?t=2604

Posted: Mon Jun 29, 2009 3:09 pm
by phpsierra
You can do it by adding two simple headers to the @mail command then adding some simple HTML code to the e-mail templates - I got that working OK. You need to know a tiny bit of very simple HTML, just <font face=> and <br> really.[/code]

header for @mail

Posted: Mon Sep 21, 2009 4:25 pm
by Leetoto
Errrh
Can you post what header you added ?

Thanks

Re: HTML email format?

Posted: Wed Jun 26, 2013 5:16 pm
by davidfdz
Hmm I'm interested in how this was done. Has anybody else tried to take a stab at this and succeeded like the previous poster has, but can post what they did?

Re: HTML email format?

Posted: Thu Jun 27, 2013 1:20 pm
by arbolpalmerita
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: HTML email format?

Posted: Mon Jul 08, 2013 6:31 am
by OSWorX
If only changing the text/plain to text/html inside the '../inc/email_functions.inc.php' the result is a shame for modern emails.
Well, to avoid this all email texts can be edited - but the emails are not really html code.

But just adding a few lines more into the '../inc/email_functions.inc.php' you give the emails a more professional look.

Open the ../inc/email_functions.inc.php (hesk 2.5.0) and search for:

Code: Select all

if ( ! $hesk_settings['smtp'])
(is inside the function function hesk_mail($to,$subject,$message) around line 285..)

and add BEFORE this code:

Code: Select all

$message = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #767676;">' . nl2br( $message ) . '</body></html>';
Do not forget to replace the 2 instances of text/plain to text/html (just below this line).

Save the script.

The emails are send now in a darker grey with font Arial in 12 px (see above).
If you prefer another look, just adopt the code above.