URL etc. for script not posted as system is internal and only accessible via VPN.
Using latest version of hesk on Zend Server running on IBM i.
Running this script:
<?php
$to = "xxx@yyy.com";
$subject = "Testing Basic PHP Mail";
$txt = "Hello from the Mail system - sent at " . date("h:i:sa");
mail($to,$subject,$txt,$headers);
?>
Works perfectly to a variety of email destinations.
Hesk email is configured just to use php mail function but no mail ever arrives. Which doesn't make sense.
I'm not an email expert and have reached the end of my knowledge on the topic. I have checked off all of the items on hesk's FAQ but no help.
Any suggestions?
Hesk email function not working
Moderator: mkoch227
Re: Hesk email function not working
HESK uses the same code, see inc/email_functions.inc.php line 294
Do you have access to any email delivery logs (Exim?)?
Do you have any SPAM filters active?
How about if you modify the code and just use : Any difference?
Code: Select all
mail($to,$subject,$message,$headers);
Do you have any SPAM filters active?
How about if you modify the code and just use :
Code: Select all
mail($to,$subject,$message);
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: Hesk email function not working
Removing the $headers seems to have fixed it for now - thank you so much!
Now that I know where the problem originates I can try and get a more permanent solution in by working out why the headers are wrong in the first place!
Now that I know where the problem originates I can try and get a more permanent solution in by working out why the headers are wrong in the first place!
Re: Hesk email function not working
The best place to look would be email server logs.
It could be that your server doesn't allow sending unauthenticated emails with "From" header set to your email address.
Switching HESK setting "Send emails using" to SMTP server and using a real email account may fix that.
It could be that your server doesn't allow sending unauthenticated emails with "From" header set to your email address.
Switching HESK setting "Send emails using" to SMTP server and using a real email account may fix that.
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