Sporadic email failure

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
jgold723
Posts: 27
Joined: Wed Nov 04, 2009 6:27 pm

Sporadic email failure

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sporadic email failure

Post 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
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
jgold723
Posts: 27
Joined: Wed Nov 04, 2009 6:27 pm

Re: Sporadic email failure

Post 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?
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sporadic email failure

Post 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.
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
jgold723
Posts: 27
Joined: Wed Nov 04, 2009 6:27 pm

Re: Sporadic email failure

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sporadic email failure

Post 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.
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
jgold723
Posts: 27
Joined: Wed Nov 04, 2009 6:27 pm

Re: Sporadic email failure

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sporadic email failure

Post 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.
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
jgold723
Posts: 27
Joined: Wed Nov 04, 2009 6:27 pm

Re: Sporadic email failure

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Sporadic email failure

Post 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.
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
Post Reply