Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Mods and Customizations

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 02-23-2012, 05:37 PM
entrican entrican is offline
Junior Member
 
Join Date: Feb 2012
Posts: 2
Default

Quote:
Originally Posted by stefkiller View Post
Does someone can provide an example of html email template ?
Perhaps I have done a mistake, because it doesn't work for me.
This worked well for me.

<html>
<head>
<STYLE TYPE=\"text/css\">
TD{font-family: Arial; font-size: 10pt;}
table { width: 700px; border: table-layout: fixed; }
</STYLE>
</head>
<body style="margin:0">
<table width="100%" height="100%"
border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ffffff" valign="top">
<table width="750" border="0" cellpadding="0"
cellspacing="0" align="center">
<tr><td bgcolor="#ffffff" width="750">
<img src="https://www.google.com/intl/en_com/images/srpr/logo3w.png"></td></tr>
<tr><td bgcolor="#ffffff" width="750">&nbsp;</td></tr>
<tr><td bgcolor="#ffffff" width="750">%message</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>

This is a basic table structure to control width and centering. It also includes a logo at the top which I substituted the google logo for.

Also notice the use of the "%message" as written in the instructions. This is working well, the only issue I'm having is a broader issue with the multi-part headers being properly recognized. I'm working with the headers now to see if a change is needed to get the emails to show up properly in an outlook. Google mail works, but other web based email clients don't seem to be consistent.

-Robert
Reply With Quote
  #22  
Old 02-23-2012, 06:03 PM
entrican entrican is offline
Junior Member
 
Join Date: Feb 2012
Posts: 2
Default bkonia - thank you for sharing! One small tweak :-)

I download the code, applied the described changes and it was working great with some web based email clients like google mail, but I couldn't seem to get it working with outlook mail clients.

After some trial and error, I realized the Mime_mail() object needed to be initialized with the newline string.

Change line #170 of bkonia's patched "class.email.php"

old code: $mime = new Mail_mime();
new code: $mime = new Mail_mime($eol);

This corrected the problem where my new HTML emails were coming in as unidentifiable text and attachments to outlook. After I changed the code to instantiate $mime with the newline character, it worked great.

I'm not sure if PEAR assumes a winows or the osTicket deployment does, but this was required for me on centos.

-Robert
Reply With Quote
  #23  
Old 03-27-2012, 03:59 PM
laotseh laotseh is offline
Junior Member
 
Join Date: Mar 2012
Posts: 1
Thumbs up Unable to find HTML in preferences

Dear All,

I have made the changes to my OSTicket, after following the steps, I am not able to find any section with name HTML in my preferences. appreciate your help on this.

Thanks and Best Regards,

Reply With Quote
  #24  
Old 04-04-2012, 04:02 PM
odekmin odekmin is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Default

hi fellas,

I applied the mod, created the table field, but whenever i paste something in the html template field and i push save, it says it was successful, but whenever I return, that field is empty, there's no trace of my template in the emails, and the sql field in mysql stays NULL.

what am I doing wrong ? :-/
Reply With Quote
  #25  
Old 04-06-2012, 01:30 AM
odekmin odekmin is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Default

Quote:
Originally Posted by odekmin View Post
hi fellas,

I applied the mod, created the table field, but whenever i paste something in the html template field and i push save, it says it was successful, but whenever I return, that field is empty, there's no trace of my template in the emails, and the sql field in mysql stays NULL.

what am I doing wrong ? :-/
Got it, a php wiz pointed to me that I had copied the files in the wrong <include> folder, <staff/include> instead of <include>.

cheers,
Reply With Quote
  #26  
Old 04-08-2012, 05:07 AM
beegees beegees is offline
Junior Member
 
Join Date: Feb 2012
Location: Belgium
Posts: 14
Default

Hello,

Is it possible to put a picture of my entreprise in an email template ?

Is the client will view this picture ?

Thank you in advance.
Reply With Quote
  #27  
Old 04-17-2012, 07:49 PM
equisde equisde is offline
Member
 
Join Date: Jan 2012
Location: Madrid - Spain
Posts: 165
Default

Very nice mod!!

It works like a charm.

Thanks & congrats!!
Reply With Quote
  #28  
Old 05-27-2012, 06:40 AM
Lupo76 Lupo76 is offline
Junior Member
 
Join Date: May 2012
Posts: 20
Default

Quote:
Originally Posted by AlphaDesignsGroup View Post
There is always one of those in there... And this is not a bad thing, just a matter of conveneince for the person receiving the mail. I know the variables used in the orignal templates can not be used in the HTML box. The thing is, the link back to the support system to check/update your ticket info "was" an html link that could just be clicked on in the email. With the HTML format around it, it is no longer a link, but just text. This software is too new for me to figure it out, so I was wondering if anyone had found a way around that so clickable links could be put into the original templates, or code to find and convert links to a clickable link before it is sent. Thanks Bkonia !!!
Has anyone solved this annoying problem?
Reply With Quote
  #29  
Old 05-27-2012, 08:12 AM
Lupo76 Lupo76 is offline
Junior Member
 
Join Date: May 2012
Posts: 20
Default

Quote:
Originally Posted by Lupo76 View Post
Has anyone solved this annoying problem?
I answered myself :-)
Unfortunately it was not easy because I have no knowledge of PHP:

the solution is as follows:
look in the file class.email.php the following code:

Code:
        $subject=stripslashes(preg_replace("/(\r\n|\r|\n)/s",'', trim($subject)));
        $body = stripslashes(preg_replace("/(\r\n|\r)/s", "\n", trim($message)));
added below the last line of code shown above as follows:

Code:
        //Inizio codice per convertire url in link
        $trova = "((http://|ftp://)[a-zA-Z0-9-_.]+[a-zA-Z0-9/.?&=_@]+)"; 
        $nuovo = "<a href=\"$0\" target=\"_blank\"> $0 </a>"; 
        $body = preg_replace($trova, $nuovo, $body);   
        //Fine codice per convertire url in link
Hello
Reply With Quote
  #30  
Old 05-30-2012, 09:02 AM
jimmyeao jimmyeao is offline
Junior Member
 
Join Date: May 2012
Posts: 9
Default

Never Mind - Great Mod!

Last edited by jimmyeao; 05-30-2012 at 09:10 AM.
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:53 PM.