Support

Akeeba Ticket System

#18405 Reply be Email using Cron

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by sdmarshall73 on Thursday, 12 December 2013 07:35 CST

sdmarshall73
 Hi,

I'm having some trouble getting my reply by email to work using the cron job.

I have attached the following setup:


screen shots

This is my email configurations:


20mb image hosting

And the response from my host support:


image url upload

What am I missing?

Regards,

Samuel

nicholas
Akeeba Staff
Manager
I am not sure if the excerpt of the mail log is from the IMAP or SMTP server. Can you please clarify?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
The support staff has clarified it's from the SMTP server.

sdmarshall73
I'm beginning to think that error doesn't have anything to do with the script. I had the option of configuring an email address so an email could be sent whenever the cron runs. I ignored that option so I think that error is sent because the email address wasn't properly configured.

I tried to run the script using shell access and I'm getting the following messages:

Preparing to check for email
An error occurred!
Application Instantiation Error

nicholas
Akeeba Staff
Manager
I see. You are using Joomla! 3.1 which is no longer supported. You will either have to use Akeeba Ticket System 1.2.x or upgrade your site to Joomla! 3.2. Given a couple of show stopper bugs in Joomla! 3.2 that are currently being fixed, I would recommend the following strategy:
- For now, downgrade to Akeeba Ticket System 1.2.x
- When Joomla! 3.2.1 is released, upgrade your site to Joomla! 3.2.1 and Akeeba Ticket System to 1.3.x

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
Ok so I downgraded ats to 1.2.4, then eventually upgraded my site to Joomla! 3.2 and reinstalled ats to version 1.3.0. On both occasions I'm still getting the error messages running the script via shell.

However when I turned 'Reply by email' off in the component options I'm getting the message:

Email was successfully fetched


This was true in both occasions. Of course the tickets weren't updated from the email, I'm assuming because 'Reply by email' was set to no.

nicholas
Akeeba Staff
Manager
I am pretty sure that you are now not getting the "Application instantiation error" you were getting when the CRON job fails. Can you please paste me the output of the CRON job?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
This is when Reply by email is off:


This is when that option is turned on:


I'm now running Akeeba Ticket System version 1.3.0 on Joomla! 3.2.0

nicholas
Akeeba Staff
Manager
In approximately 5 minutes a new dev release will be available in https://www.akeebabackup.com/download/ats-dev.html which fixes this issue. Can you please install it and confirm that it resolves the issue for you?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
This one did the trick. The script ran successfully without errors and the tickets were updated.

I had assumed the status would've been updated to open though. That would've made it easier to identify tickets that require attention in the back end.

Anyway while you are it; I was trying to schedule the ticket system offline for the weekends but when I selected Saturday and Sunday for the schedule and clicked save, it was applied to the *, effectively shutting down the ticket system altogether. Didn't realize until people started to email saying they couldn't submit any tickets. I didn't try any other schedules but this happens every time I try to save this schedule. I was wondering if I should submit another ticket or just append it to this one.

Another thing but this is more like a favour. Would you consider adding
class="btn-group"

to your radio fields with yes no values in config.xml? I have to keep adding them after an upgrade to get them styled as they appear in the first screen shot. That seems to be the way it's done in Joomla 3+.

Thanks

sdmarshall73
Oh I just checked and the issue with the scheduling seems to be resolved in the release I just installed so you can ignore that one.

nicholas
Akeeba Staff
Manager
> I had assumed the status would've been updated to open though

What do you mean, they are set to the Open status.

> Oh I just checked and the issue with the scheduling seems to be resolved in the release

Yes, I fixed it 2 days ago

> That seems to be the way it's done in Joomla 3+.

Ask me again in 9 months. Right now the XML file is common in Joomla! 2.5 and 3.x and cannot include this kind of Joomla! version-specific classes :(

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
Ok what I mean is, when a user opens a ticket on the site the status is set to open. When admin responds, the ticket status is set to pending and when the user responds again the status is reset to open, etc.

However, when they reply by email and the messages are recovered by the CRON script the ticket is updated with the messages but the status still says pending. Normally the open status serves as a visual indicator in the back-end for which tickets need attention so for now it's easy to overlook these replies.

Re the btn-group class, I include those in Joomla 2.5 XML files so far without any adverse effect. The class is added to the element but simply ignored because there are no CSS styling to apply. This is not a big issue though so not to worry. I plan to try and add some CSS to the backend to apply to these radio buttons anyway because some other installed extensions are not styled like that and I can't be bothered to keep updating all of these XML files.

nicholas
Akeeba Staff
Manager
I can't reproduce this, but I have an idea of what is going on. When a manager of any ATS category replies to any ticket the ticket status is set to Pending instead of Open. When the original user who opened a ticket replies to a ticket and he's not a manager of any Akeeba Ticket System category the status is set to Opened. This code is shared between the web and email post gateways, so there's no way it can work in one case and not the other one. I have tested this before replying, my analysis is a combination of observed behaviour and reading the code.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
I see. Well I don't know if it's something specific to my site or if I'm doing something wrong. I enabled the reply by email feature and set the cron. I just tested it by creating a user and simulated a chat session from two different computers and the results were still the same. When the user replied via the web the chat status was updated to open. When the user replied via email and after the cron runs, the chat was updated with the message but the status still said pending.

Right now I'm just using one category with an email address set for use with tickets and I'm only allowing private tickets.

I'm waiting to see what happens the next time a 'real' user replies by email though I have no reason to believe it will behave differently.


free screen capture

nicholas
Akeeba Staff
Manager
Did you have any other tickets by your users in the meantime? I am still not able to reproduce this :(

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
Yes from time to time users post tickets. A user just posted this message:

helllo, i replied to a ticket via email. Now your system is sending me an email every 30mins telling me a shouldn't have.

"Hello,

You tried sending us an email to an email address used by our users to submit support tickets. Unfortunately, you are not a user of our site yet. As a result your email was automatically deleted and you shall not receive any reply.

If you are a user of our site, please make sure that you are sending the email from the email address associated with your user account. There is no way to allow you to use multiple email addresses per user account or otherwise authenticate you."

Can you please stop it from doing this? Thanks.


I think he somehow used a different email address to respond or changed the email address on the website midstream but every time the cron runs he was getting this message. I've deleted the email he sent so hopefully that'll resolve this issue but this is probably something you can look at.

I'll disable the reply by email for now and stop the cron until I can figure out how to get it working properly on my site. I'll try it again when you release the next update and see if anything changes. I really like this feature though and this was half the reason I switched to ATS so that's a bummer.

Anyway, when I have more time I'll do some more testing and if I come up with anything useful I'll let you know.

nicholas
Akeeba Staff
Manager
> I've deleted the email he sent so hopefully that'll resolve this issue but this is probably something you can look at.

There is an option which defines what happens with email messages already processed. If you do not choose to delete them they will have to be processed every single time the CRON job runs, sending out the relevant message to the user.

> I really like this feature though and this was half the reason I switched to ATS so that's a bummer.

Email replies have never been a feature easy to set up in any ticket system I've seen (unless you're talking about ticket systems hosted on another company's site, which come with their own set of challenges). Guess what is the most problematic part of email replies? How to handle unexpected input. There's really only that much you can do: make an assumption and hope for the best. It's not something that can be somehow "fixed". What you consider an ideal approach is someone else's worst case scenario. So we end up with a system that's somewhere in the middle. Don't expect any changes in the next release, especially when I cannot reproduce either of your issues using my local, live and GMail's POP3 and IMAP servers on Joomla! 2.5 and 3.2 (a total of 12 different test configurations).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sdmarshall73
Ok thanks Nicholas, for the excellent support. I appreciate the time and effort you have spent of this and your timely replies.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!