I send from to different emails. subejt emails (test sample(2))Klemen wrote:Send 3 sample emails to pop3test AT hesk DOT com and I will see what comes at my end.
Email piping and simple email from mail()
Moderator: mkoch227
Re: Email piping and simple email from mail()
Re: Email piping and simple email from mail()
Can you let me know what version of PHP are you running?
Also, please try this:
1. open file inc/pipe_functions.inc.php in a text/html editor
2. find
3. instead of that code use
4. save, upload and test.
Does this help with the name issue?
Also, please try this:
1. open file inc/pipe_functions.inc.php in a text/html editor
2. find
Code: Select all
$tmpvar['name'] = hesk_input($results['from'][0]['name']) or $tmpvar['name'] = $hesklang['pde'];
Code: Select all
if ( empty($results['from'][0]['name']) )
{
$tmpvar['name'] = $hesklang['pde'];
}
else
{
$tmpvar['name'] = $results['from'][0]['name'];
if (! empty($results['subject_encoding']) && strtoupper($results['subject_encoding']) != 'UTF-8' )
{
$tmpvar['name'] = iconv($results['subject_encoding'], 'UTF-8', $tmpvar['name']);
}
}
Does this help with the name issue?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
Thanks, name issue is solved.
PHP version: 5.3.10-1ubuntu3.2
It turns out that the staff and the customers do not always get the notifications, not only about new tickets, but also the answers. I was testing a lot. Ticket creates, but e-mail can not be sent. If I sent it to "email piping 'by email when cron runs, email notification not sent to clients / staff, but if I run manually hesk_pop3.php is entered into the browser address bar then sends Emails notification. I add in hesk_notifyCustomer function (email_functions.inc.php file), simple mail () function that sent to my e-mail additional notification, and is the same situation as the press themselves before mentioned, if run hesk_pop3.php file in browser - I get two notifications (one from hesk and one from my mail (), if during cron job is not getting any the notifications. I think I still have get 1 empty(subject,message) notification from my mail() when runs cron?
PHP version: 5.3.10-1ubuntu3.2
It turns out that the staff and the customers do not always get the notifications, not only about new tickets, but also the answers. I was testing a lot. Ticket creates, but e-mail can not be sent. If I sent it to "email piping 'by email when cron runs, email notification not sent to clients / staff, but if I run manually hesk_pop3.php is entered into the browser address bar then sends Emails notification. I add in hesk_notifyCustomer function (email_functions.inc.php file), simple mail () function that sent to my e-mail additional notification, and is the same situation as the press themselves before mentioned, if run hesk_pop3.php file in browser - I get two notifications (one from hesk and one from my mail (), if during cron job is not getting any the notifications. I think I still have get 1 empty(subject,message) notification from my mail() when runs cron?
Re: Email piping and simple email from mail()
Perhaps when running Cron the script is run under root user that doesn't have mail() command configured properly?
Try using SMTP server instead and see if that works for you. Make sure you use the same email address for sending via SMTP as email address you have set as "From email" in settings.
Try using SMTP server instead and see if that works for you. Make sure you use the same email address for sending via SMTP as email address you have set as "From email" in settings.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
Using pop3 use only on email piping to get email to ticket? Or uses to send staff answer notification emails too?
Re: Email piping and simple email from mail()
On the settings page Email tab look above where it says "Send email using:"
You probably have "PHP Mail()"? Use "SMTP Server" instead and enter your account details for the email you are using.
You probably have "PHP Mail()"? Use "SMTP Server" instead and enter your account details for the email you are using.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
I dony no whats wrong. using php mail() - emails don't send, using smtp - emails send, but php mail() works well , but not on email pipingKlemen wrote:On the settings page Email tab look above where it says "Send email using:"
You probably have "PHP Mail()"? Use "SMTP Server" instead and enter your account details for the email you are using.
Re: Email piping and simple email from mail()
This is because when using Cron or Email piping your server runs PHP under a different user, probably "root". And probably something is wrong with either mail() setup for root user or some email sending permissions are wrong.
To debug that you would need root access to the server and check PHP logs, Exim logs etc.
To debug that you would need root access to the server and check PHP logs, Exim logs etc.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
To confirm that create a simple PHP mail script for testing and run it as cron job:
If the test email doesn't arrive when you set this script to run as a cron job, then problem is most likely PHP configuration for root.
If the test email does arrive, then the root users probably doesn't have permission to send mail with "From:" being set to your email address (check exim logs for "Sender verify failed").
Code: Select all
#!/usr/bin/php -q
<?php
mail('you@youraddress.com', 'Test email from Cron', 'This is a test message');
echo "Email sent!";
?>
If the test email does arrive, then the root users probably doesn't have permission to send mail with "From:" being set to your email address (check exim logs for "Sender verify failed").
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
sometimes cuts end of the name, if original name is "Nick Dėrius" after email piping name is "Nick D", I just noticed that happens only with "ė" letter, cuts everything after this letter and this letter.Klemen wrote:Can you let me know what version of PHP are you running?
Also, please try this:
1. open file inc/pipe_functions.inc.php in a text/html editor
2. find3. instead of that code useCode: Select all
$tmpvar['name'] = hesk_input($results['from'][0]['name']) or $tmpvar['name'] = $hesklang['pde'];
4. save, upload and test.Code: Select all
if ( empty($results['from'][0]['name']) ) { $tmpvar['name'] = $hesklang['pde']; } else { $tmpvar['name'] = $results['from'][0]['name']; if (! empty($results['subject_encoding']) && strtoupper($results['subject_encoding']) != 'UTF-8' ) { $tmpvar['name'] = iconv($results['subject_encoding'], 'UTF-8', $tmpvar['name']); } }
Does this help with the name issue?
Re: Email piping and simple email from mail()
This probably means the email client doesn't encode client name properly - for example encoding says it's ISO-8859-13 but that character is actually in a different encoding and PHP iconv function stops.
If you forward an email with this problem to my pop3test address I can check to confirm.
If you forward an email with this problem to my pop3test address I can check to confirm.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
I do not have the chance to do it because the emails are from customers.Klemen wrote:This probably means the email client doesn't encode client name properly - for example encoding says it's ISO-8859-13 but that character is actually in a different encoding and PHP iconv function stops.
If you forward an email with this problem to my pop3test address I can check to confirm.
Re: Email piping and simple email from mail()
I find that need use setlocale if using iconv. its true, perhaps it correct the problem?
http://stackoverflow.com/questions/7931 ... -setlocale
http://stackoverflow.com/questions/7931 ... -setlocale
Re: Email piping and simple email from mail()
I'm not sure how that would help in your case, but feel free to try it.
My best guess still is that the emails aren't properly encoded, but unfortunately I can't be sure or test it unless I see them.
My best guess still is that the emails aren't properly encoded, but unfortunately I can't be sure or test it unless I see them.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Email piping and simple email from mail()
How I can test it self what is encoded? because I can't send clients emailKlemen wrote:I'm not sure how that would help in your case, but feel free to try it.
My best guess still is that the emails aren't properly encoded, but unfortunately I can't be sure or test it unless I see them.