HESK e-mail piping public BETA (test version)

Helpdesk for my helpdesk software

Moderator: mkoch227

Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

I assume one of your Hesk staff has "support@primarydomain.com" set as their e-mail address and that's why Hesk is sending e-mail to this address? If yes, it's a systematic problem.

The solution would be to use "support@primarydomain.com" as a piping address BUT each staff should have it's own unique (not "support") email address, like "john.doe@primarydomain.com". So when a ticket is created the e-mail notification goes to "john.doe@..." and not "support@...".
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
Promofinity
Posts: 2
Joined: Mon May 30, 2011 5:09 pm

Re: HESK e-mail piping public BETA (test version)

Post by Promofinity »

Hi Klemen

You are 100% correct - Thank you. It was obvious on reflection, but I had missed it!!

Thank you for your prompt response.
Kevin
hezvale
Posts: 3
Joined: Thu Jun 02, 2011 5:37 am

Re: HESK e-mail piping public BETA (test version)

Post by hezvale »

Holla,

I like HESK program.

By evaluating the email piping, I'm using DirectAdmin not Cpanel hence no Advance Options for me to fill-up the pipe to program. Only forwarding to email, What should I do?

Thanks
ibanez0r
Posts: 6
Joined: Wed Sep 02, 2009 5:13 am

Re: HESK e-mail piping public BETA (test version)

Post by ibanez0r »

hi,

I tried the piping beta test script and received local deliv failure as well with the following error:

Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...] .... etc

php error_log... empty..
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

Your PHP installation doesn't seem to be accepting parameters - the script isn't even executing.

It is up to you to propelry configure your PHP setup, I would rcommend trying with a sample script first, like suggested here:
viewtopic.php?f=13&t=3351&start=15#p14463

Once you get the test script working on your server you can move to the Hesk piping script.
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
mathias
Posts: 1
Joined: Mon Jun 20, 2011 9:15 am

Re: HESK e-mail piping public BETA (test version)

Post by mathias »

I know, BETA is for testing but at my site I can not use email piping and I don't want to wait. So I have changed the script to use it with a normal pop3 mail account.
The script opens the pop3 mail account and fetch all the mails. Every mail is temporary stored as file and will be parsed with the original functions.
I have made only a small change in email_parser.php.

1. Replace function save_forward_mail($tmpfilepath) with save_forward_pop3_mail($tmpfilepath). Arround line 113.

Code: Select all

113: //save_forward_mail($tmpfilepath);
113: save_forward_pop3_mail($tmpfilepath);
2. Add new function save_forward_pop3_mail($tmpfilepath);. I did it arround line 340 after the original function save_forward_mail($tmpfilepath).

Code: Select all

function save_forward_pop3_mail($tmpfilepath)
{
    $_pop3_host = 'pop3.mail.server';
    $_pop3_user = 'user';
    $_pop3_pass = 'pass';
    $mbox = imap_open("{" . $_pop3_host . ":110/pop3/notls}INBOX", $_pop3_user, $_pop3_pass)
              or die("can't connect: " . imap_last_error());
    $MC = imap_check($mbox);
    $result = imap_fetch_overview($mbox, "1:{$MC->Nmsgs}", 0);
    foreach ($result as $msg) {
        $email = array();
        $raw_email = imap_fetchbody($mbox, $msg->msgno, NULL);
        $tmpfp = fopen($tmpfilepath,"w");
        fwrite($tmpfp, $raw_email);
        fclose($tmpfp);
        imap_delete( $mbox, $msg->msgno );
    }
    imap_expunge($mbox);
    imap_close($mbox);  
}
All you have to do is change pop3 host, username and password for your enviroment. For a release version this should be set with a config file. But this is only Beta and for testing.
Please use a pop3 dummy account for testing, because all fetched mails will be deleted after parsing.
Now open http://yourdomain/hesk/inc/mail/hesk_pipe.php in your Browser. A new ticket for every mail in yout pop3 mailbox should be generated. For easy use just set up a cron job.

Regards,
Mathias
rdishong
Posts: 1
Joined: Mon Jul 18, 2011 2:27 pm

Re: HESK e-mail piping public BETA (test version)

Post by rdishong »

We are testing the helpdesk software and have noticed an issue with the tickets that are being input via email pipeing. it is stripping the carriage returns, "rs", and "ns" from emails. those are just the ones I have noticed. Someone can email in, "This person would like to be contacted by email." and then it strips out the "rs" and says in the ticket "This peon would like to be contacted by email"

While funny as hell on the back end, not so funny when we forget to fix those and reply. Any ideas on this?

I can take screenshots and send them to you if needed. Thanks!
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

Nice catch. Could you upload this file and let me know if it fixes the issue for you?
http://www.phpjunkyard.com/extras/email_parser.zip
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
ruffmeister
Posts: 48
Joined: Wed Jun 16, 2010 2:52 pm

Re: HESK e-mail piping public BETA (test version)

Post by ruffmeister »

query about custom fields

I have a custom field on hesk if a customer emails the address and the txt contains the custom field will / can it log a call with that custom field pre filled?

i.e the call has the word PC and my field is fault component and it chooses PC?
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

I'm afraid there is no way for Hesk to recognize custom fields from email as each user can send the email ina completely different format.
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
ruffmeister
Posts: 48
Joined: Wed Jun 16, 2010 2:52 pm

Re: HESK e-mail piping public BETA (test version)

Post by ruffmeister »

ok - is it then possible for it still to pipe but for it to auto choose a default field from the custome field such as 'unassigned'
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

In the hesk_pipe.php you would have to define default values for custom fields. For example just below

Code: Select all

foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
	$tmpvar[$k] = '';
}
you would need to paste something like:

Code: Select all

$tmpvar['custom1']='Default value';
$tmpvar['custom2']='Unassigned';
$tmpvar['custom3']='12345';
For each custom field you use.
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
copetti
Posts: 14
Joined: Mon Aug 08, 2011 6:09 pm

Re: HESK e-mail piping public BETA (test version)

Post by copetti »

Hesk is very good, congratulations. More email piping, even better. I want to know if it is possible to open ticket from the pipe, only specific emails.

I look back! Great job!
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK e-mail piping public BETA (test version)

Post by Klemen »

Not sure that you mean?
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
copetti
Posts: 14
Joined: Mon Aug 08, 2011 6:09 pm

Re: HESK e-mail piping public BETA (test version)

Post by copetti »

Klemen wrote:Not sure that you mean?
Sorry my english!

English:
It's possible open ticket for pipe, only registered mail? Do not leave any open ticket by email pipe.

Portuguese:
É possível abrir ticket por pipe, somente emails cadastrados? Não deixar qualquer email abrir ticket por pipe.
Locked