Page 2 of 2

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Tue Aug 07, 2012 5:16 pm
by Klemen
And this file should process embedded images in messages:
http://www.phpjunkyard.com/extras/email ... bedded.zip

It goes into "inc/mail" folder. It will process embedded images (until max allowed attachments are reached).

Attached files have priority over embedded. For examples if you allow 2 attached files and send an email with 1 attached and 3 embedded images, only 2 attachments will be added: the attached file + first embedded image.

Please test this file and report how it goes.

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Wed Aug 08, 2012 6:13 am
by wed
hello



(I use hesk since its first version and it is always a pleasure to use this platform)

i was tested with your patch (thank very much)

for the test, i have 2 files:
i accpet 2 attachment files with extention docx
  • Audit de sécurité Loïc.docx 14 KO
    François Thèse mémoire équipe.docx 21 KO
i send it by email to ex: mysupport@domain.com
From: me@domain.com
Subject: Test message support (éééiiiï)
message: hello, can you print it. thx. Wed((éééiàiiï)

i receive the message on my pop3 support after check ticket :
http://mydomain.com/_V2.4/inc/mail/hesk_pop3.php

The page return:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Array ( [0] => Array (
[orig_name] => Audit de sécurité Loïc.docx
[size] => 13762
[stored_name] => /var/www/vhosts/www/web/_V2.4/attachments/8029ee0c30c025f7a58de3f897a0e6ad/3
[type] => application/vnd.openxmlformats-officedocument.wordprocessingml.document message parts are not yet recognized. You can define these part type names and descriptions setting the custom_mime_types class variable. Please contact the author Manuel Lemos and send a copy of this message to let him add support for this kind of messages )
[1] => Array ( [orig_name] => François Thèse mémoire équipe.docx [size] => 15982
[stored_name] => /var/www/vhosts/www/web/_V2.4/attachments/8029ee0c30c025f7a58de3f897a0e6ad/4
[type] => application/vnd.openxmlformats-officedocument.wordprocessingml.document message parts are not yet recognized. You can define these part type names and descriptions setting the custom_mime_types class variable. Please contact the author Manuel Lemos and send a copy of this message to let him add support for this kind of messages )
)
i receive a notification mail the new ticket

i connect connect on my admin pannel to see the ticket
the result is:
i have a good format subject and body message
I have not attachments in link
i have nothing in attach folder

i tried with old stript (2.4 RC) with the same message and files

i was modified the php function pipe_functions.inc.php

Code: Select all

// Generate a random file name
			$myatt['real_name'] = str_replace(array('/','\\','#',',',' '), array('','','','','_'),$myatt['real_name']);
 
I added below

Code: Select all

$myatt['real_name'] = str_replace(array('À','Á','Â','Ã','Ä','Å','à','á,','â','ã','ä','å','Ò','Ó','Ô','Õ','Ö','Ø','ò','ó','ô','õ','ö','ø','È','É','Ê','Ë','è','é','ê','ë','Ç','ç','Ì','Í','Î','Ï','ì','í','î','ï','Ù','Ú','Û','Ü','ù','ú','û','ü','ÿ','Ñ','ñ'), array('a','a','a','a','a','a','a','a','a','a','a','a','o','o','o','o','o','o','o','o','o','o','o','o','e','e','e','e','e','e','e','e','c','c','i','i','i','i','i','i','i','i','u','u','u','u','u','u','u','u','y','n','n'),$myatt['real_name']);

$myatt['real_name'] = str_replace(array('À','Á','Â','Ã','Ä','Å','à','á,','â','ã','ä','å','Ò','Ó','Ô','Õ','Ö','Ø','ò','ó','ô','õ','ö','ø','È','É','Ê','Ë','è','é','ê','ë','Ç','ç','Ì','Í','Î','Ï','ì','í','î','ï','Ù','Ú','Û','Ü','ù','ú','û','ü','ÿ','Ñ','ñ'), array('a','a','a','a','a','a','a','a','a','a','a','a','o','o','o','o','o','o','o','o','o','o','o','o','e','e','e','e','e','e','e','e','c','c','i','i','i','i','i','i','i','i','u','u','u','u','u','u','u','u','y','n','n'),$myatt['real_name']);

$myatt['real_name'] = str_replace(array('Š','Ž','Æ','æ','Ð','š','ž','ß','µ'), array('S','Z','AE','ae','D','s','z','ss','u'),$myatt['real_name']);
			
			//add by wed to check message information 
			echo '<br>';
			echo $tmpvar['name'];
			echo '<br>';			
			echo $tmpvar['subject'];
			echo '<br>';
			echo $myatt['real_name'];
			echo '<br>';
			echo '<br>';

it's work :)
all accents was rename on the ticket

i test now embed message
thank very much

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Wed Aug 08, 2012 6:31 am
by wed
Klemen wrote:And this file should process embedded images in messages:
http://www.phpjunkyard.com/extras/email ... bedded.zip

It goes into "inc/mail" folder. It will process embedded images (until max allowed attachments are reached).

Attached files have priority over embedded. For examples if you allow 2 attached files and send an email with 1 attached and 3 embedded images, only 2 attachments will be added: the attached file + first embedded image.

Please test this file and report how it goes.
Thank you very much

It is perfect it works

I well get the picture numbers of unauthorized attachments
and these are the attachments that are a priority to images of the body of the message

is it possible to put a condition if the message contains images in the body of the message then display all them. because I am afraid that with some signature limit that we lose information in the ticket

example
It allows 3 attachments
the plaintiff sent two attachments docs and excel and two screens schot
and he holds an image in his signature

will then see that 3 attachments both files attached and a single screen shot
and the other two images are not posted in the ticket

Thank you for your response

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Wed Aug 08, 2012 8:06 am
by Klemen
Thank you very much for testing this and providing feedback. I think I have a robust solution for file names now.

My tests went fine, but could I ask you to test this with your file names one more time please to verify (the two files go into "inc" folder):
http://www.phpjunkyard.com/extras/hesk24_pipe2.zip

For embedded images, try increasing allowed attachments like this - in "inc/mail/email_parser.php" find

Code: Select all

$r["attachments"] = array_merge($r["attachments"], process_attachments($result["Related"]) );
Just ABOVE that code add

Code: Select all

$hesk_settings['attachments']['max_number'] = 20;
This should increase max allowed attachments to 20 if embedded files are found.

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Wed Aug 08, 2012 8:37 pm
by wed
Klemen wrote:Thank you very much for testing this and providing feedback. I think I have a robust solution for file names now.

My tests went fine, but could I ask you to test this with your file names one more time please to verify (the two files go into "inc" folder):
http://www.phpjunkyard.com/extras/hesk24_pipe2.zip

For embedded images, try increasing allowed attachments like this - in "inc/mail/email_parser.php" find

Code: Select all

$r["attachments"] = array_merge($r["attachments"], process_attachments($result["Related"]) );
Just ABOVE that code add

Code: Select all

$hesk_settings['attachments']['max_number'] = 20;
This should increase max allowed attachments to 20 if embedded files are found.

Hello
I have several tests

I have only one word: great!
I just test by replacing all files provided

now I get correctly tickets with attached files and screens schoot
small bonus not expected but which is super, if a user sending mail with the same screenshot several times a single image is attached

I confirm that the names of attachments with accents are rename.
that the embeded images are present.
thank you for the tips

Code: Select all

$hesk_settings['attachments']['max_number'] = 20;


is that the changes that are to view together will be implemented in the final version?
can you imagine an additional option in the admin panel in the email tab?
number of images Embedded in the body of the message


I continue to test this new version to make a feed back
in any case thank you for this major evolution

wed

Re: HESK version 2.4 RELEASE CANDIDATE

Posted: Wed Aug 08, 2012 8:49 pm
by Klemen
Thanks for testing!

I plan to release 2.4 very soon (next few days), just need to do some final checks. I won't give promises about embedded files, but it just may be included.