Page 1 of 1

Sporadic email failure

Posted: Wed Oct 24, 2012 2:01 pm
by jgold723
Script URL: http://www.sacomaine.org/helpdesk
Version of script: 2.4
Hosting company: One World Hosting
URL of phpinfo.php: http://www.sacomaine.org/hidden/php_info.php
URL of session_test.php: Sorry, not sure how to do this
What terms did you try when SEARCHING for a solution: email failure

Write your message below: This script has normally been rock solid. But in the past month, we've had several tickets posted without any email notification. This has been on multiple categories. I've checked and no one assigned to those categories have received notifications, including myself, who receives all ticket notifications.

Any ideas as to what might cause this? It's not consistent.

John

Re: Sporadic email failure

Posted: Wed Oct 24, 2012 7:56 pm
by Klemen
There are many reasons why email delivery fails and can be hard to troubleshoot sometimes.

Have you tried all of these steps to the point?
http://www.hesk.com/knowledgebase/?article=25

Re: Sporadic email failure

Posted: Mon Oct 29, 2012 1:48 pm
by jgold723
Hi -- I have tried most of the suggestions. The emails are definitely not landing in spam filters. I have enabled debug, but am receiving no errors. I'm currently checking with the host now to see if there are any issues with PHP mail.

The problem seems to have started when I upgraded to version 2.4. I've patched that install with the 2.4.1 version, but that doesn't seem to have fixed the issue. Is there any possibility that may have changed something?

Re: Sporadic email failure

Posted: Mon Oct 29, 2012 1:52 pm
by Klemen
Have you tried using a real email account (SMTP server) instead, for example support@yourdomain.com?

Have you made 100% sure the "From: email" setting is the same as this real email account address (support@yourdomain.com)?

99% of problems I've seen lately are exactly because email say they are for example from "support@yourdomain.com" but PHP actually sends them out as nobody (without authentication) hence the email server blocks them.

This should be evident from the Email server logs (for example exim_mainlog), but you won't have access to that file unless you are on a VPS/Dedicated server.

Re: Sporadic email failure

Posted: Mon Oct 29, 2012 2:28 pm
by jgold723
Well, one good thing -- the problem is no longer sporadic -- now there's no email coming through at all.

Here's what I've done:

1) On the webserver, I've set up an account for the email address used on HESK;

2) On HESK, I've change the mail to SMTP;

3) I've set it to use localhost and entered all the correct information to use the local SMTP server: Username, password, port

4) The SMTP server tests OK, but mail is not sent out.

Just as background -- the client (sacomaine.org) maintains their own MX server, so the zone file for smtp.sacomaine.org points to a remote server. But I'm assuming that using localhost will cause the script to point to the local smtp server, not the remote?

John

Re: Sporadic email failure

Posted: Mon Oct 29, 2012 3:28 pm
by Klemen
Don't use "localhost", use the exact same login details (SMTP server name, port, username and password) as you would in a normal email client (most common server name is smtp.yourdomain.com).

Also, again, make sure that the "From email" setting in HESK is the same as the email address you use to send emails via SMTP.

Re: Sporadic email failure

Posted: Mon Nov 05, 2012 1:04 pm
by jgold723
We're still having sporadic problems -- today we received three tickets and only two sent notifications.

I'm thinking this is a problem with the host, but I need to capture the errors when they happen to show them.

Is is possible to set this script to write errors to a log file?

Thanks,

John

Re: Sporadic email failure

Posted: Mon Nov 05, 2012 5:43 pm
by Klemen
When using SMTP to send mail and with Debug mode ON in HESK settings, HESK should throw an error if connecting to SMTP and sending doesn't succeed.

However, it's ultimately up to the mail server to deliver messages. Your host should be able to check status (and any errors) of any message in mail server logs (for example exim_mainlog) if you give them recipient address.

Re: Sporadic email failure

Posted: Mon Nov 05, 2012 5:57 pm
by jgold723
We don't have access to an SMTP server, so we're using the PHP Mail function (which has been fine until now).

I don't know if you received the post that followed (I don't see it here), so I'll repeat:

I did find an error log in the cpanel and did some testing. I found only two errors, both of which were related to missing files (a 404 file and a graphic file). I did notice one thing -- one test was successful(an email was sent), the other was not) and the error lines were slightly different -- showing different page references for similar submisions.

Please see below:

THIS TEST WAS NOT SUCCESSFUL
[Mon Nov 05 12:38:07 2012] [error] [client 205.209.79.194] File does not exist: /home2/sacoweb/public_html/404.shtml, referer: http://www.sacomaine.org/helpdesk/submit_ticket.php
[Mon Nov 05 12:38:07 2012] [error] [client 205.209.79.194] File does not exist: /home2/sacoweb/public_html/helpdesk/questionmark.jpg, referer: http://www.sacomaine.org/helpdesk/submit_ticket.php


THIS TEST WAS SUCCESSFUL
[Mon Nov 05 12:37:21 2012] [error] [client 205.209.79.194] File does not exist: /home2/sacoweb/public_html/404.shtml, referer: http://www.sacomaine.org/helpdesk/index.php?a=add
[Mon Nov 05 12:37:21 2012] [error] [client 205.209.79.194] File does not exist: /home2/sacoweb/public_html/helpdesk/questionmark.jpg, referer: http://www.sacomaine.org/helpdesk/index.php?a=add

Re: Sporadic email failure

Posted: Mon Nov 05, 2012 7:27 pm
by Klemen
404 errors have nothing to do with sending mail, these just mean that the "questionmark.jpg" (which you call from your HTML) is missing.

Even if you send mail over PHP mail the mail server is responsible for mail deliveries. The exim_mainlog (or other appropriate log if your server doesn't use Exim) is the first and foremost thing to check.