You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2014-08-13 18:04:49

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Carriage return on mail

Hello,

I would like to create a rupture with 3 Carriage return on the mail when you created a new ticket.
This my code and after the result on a mail :

<p>##lang.ticket.title## : ##ticket.title##</p>
<p><br /><br /><br /></p>
<p>##lang.ticket.status## : ##ticket.status##</p>

669585661.png

There a blank on the first return (red arrow).

Could you give the better solution to correct this problem ?

Thanks for help

Offline

#2 2014-08-14 18:54:51

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Carriage return on mail

Can you post where you define the background?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2014-08-14 23:09:12

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

I define my background in Setup\Notifications\Notifications templates\ and I choose Tickets and I clic on Default translation.
I create my htlm code in Email HTML body.

I don't define CSS.

Offline

#4 2014-08-15 08:57:29

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Carriage return on mail

backgroung of a notification is white.
In your example you have blue background.
How do you define this in your HTML notification?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2014-08-15 12:28:40

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

It's not a background.
This is the selection with the mouse to show the problem.

Offline

#6 2014-08-15 14:14:26

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Carriage return on mail

OK.
You can't put several <br />
If you want space after <p> user le css like
<p  style="margin-bottom:20px">##lang.ticket.title## : ##ticket.title##</p>
or
<p style="margin-bottom:20px">##lang.ticket.status## : ##ticket.status##</p>


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2014-08-16 09:17:49

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

It doesn't work.
I haven't carriage return beetwen the 2 lines.

Offline

#8 2014-08-17 17:55:50

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Carriage return on mail

But uou have space before or after your paragraphe.
Il you want several carriages, you must add &nbsp; with your <br />


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#9 2014-08-22 08:47:28

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

Could you show me an example ?

Offline

#10 2014-08-22 09:00:24

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Carriage return on mail

try this

<p>##lang.ticket.title## : ##ticket.title##<br /><br /><br /></p>
<p>##lang.ticket.status## : ##ticket.status##</p>

Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#11 2014-08-22 11:59:43

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

I already try this but when I save the modification glpi delete the <br />.

Offline

#12 2014-08-24 10:09:47

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Carriage return on mail

hi,
GLPI version ?

i tried with 0.83.8, it works.(i typed the tags in the translation, not by using the html editor button)

could you post the received email source ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#13 2014-08-24 10:28:29

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Carriage return on mail

something new :
i tried with 0.84.5 and received the notification:
see the source below :

<p>Titre : test saut de ligne</p>
<p><br /><br /><br /></p>
<p>Statut : En cours (Attribu&eacute;)</p></code></pre>
<p></p>

Reading te email with  "MS outlook 2010" i can see these blanks.
if I paste the code into notepad, save as "test.html" and open with IE8 or chrome, i dont see these blanks.

I would say this is an outlook problem, not from GLPI.

Can you reproduce ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#14 2014-09-02 16:47:05

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

Hello,

Here the email source :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                        'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html>
                        <head>
                         <META http-equiv='Content-Type' content='text/html; charset=utf-8'>
                         <title>[GLPI #0024011] Titre : Test_SMS </title>
                         <style type='text/css'>
                           
                         </style>
                        </head>
                        <body><p>Titre : Test_SMS</p>
<p><br /><br /><br /></p>
<p>Statut : En cours (Attribu&eacute;)</p><br><br>--

Glpi version: 0.84.3
I'm using Outlook 2007.

Offline

#15 2014-09-02 16:57:06

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Carriage return on mail

I confirm, if I copy your code (with </body></html> tags) in a test.htm file :
open with IE8 or FF : OK no blanks
Open with MS WORD 2010 (it is like outlook): there are blanks before <br/> !

this is not a glpi problem.
I wish I could help you more, I Knwow Why but I dont know how to solve... :-\


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#16 2014-09-02 17:03:34

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

I tell my problem with my collegue of network IT and for him it's not a problem with outlook because we use an Exchange servor.

Offline

#17 2014-09-02 19:36:00

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Carriage return on mail

How does he explain that  this single email is correctly displayed in IE and not in outlook 2007 ?

you also can see that the blank is not in the source.


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#18 2014-09-10 08:10:54

jalvergne
Member
Registered: 2013-02-14
Posts: 47

Re: Carriage return on mail

Do you use an exchange servor or what system do you use to manage your email ?

Offline

Board footer

Powered by FluxBB