HTML email format?

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
mosh
Posts: 3
Joined: Thu Nov 27, 2008 7:21 am

HTML email format?

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

Post 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
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
phpsierra
Posts: 4
Joined: Mon Jun 29, 2009 10:01 am

Post 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]
Leetoto
Posts: 4
Joined: Wed Apr 08, 2009 4:47 pm

header for @mail

Post by Leetoto »

Errrh
Can you post what header you added ?

Thanks
davidfdz
Posts: 2
Joined: Wed Jun 26, 2013 4:37 am

Re: HTML email format?

Post 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?
arbolpalmerita
Posts: 4
Joined: Wed Dec 19, 2012 11:48 pm

Re: HTML email format?

Post 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.
OSWorX
Posts: 24
Joined: Sat Jul 06, 2013 9:43 am

Re: HTML email format?

Post 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.
OSWorX - OpenSource Development :: OpenCart Developer
Post Reply