I'm trying to set up email. I'm starting with one client, with a new and functioning POP account. Inbound email integration is set up for the client. When I click "Fetch" I get a white screen with this fatal error:

Fatal error: Call to undefined function imap_open() in [mypath]/sites/all/modules/jobtrack/jobtrack.module on line 1313

The account is not IMAP enabled, and the account is set for POP in the Job Tracker settings.

Any ideas?

Comments

juroon’s picture

update:

Moving on with some other things, I added the Calendar and Date modules to the site, and when I enabled Calendar, Date API, and Date Timezone, I got the exact same error.

- Deleted jobtrack and jobtrack_views from my server and it came back to life.
- Uploaded just jobtrack again and got the error - deleted it again and my site loaded.
- Turned off just the the calendar module, uploaded jobtrack again - no error.
- Unchecked "Integrate inbound email" on the Job Tracker client configuration pages where it was enabled (two clients) and re-enabled calendar - no error. No email, but no error.

I don't know if any of that is helpful, but there it is.

Gnorizo’s picture

In order to use the "Inbound email integration" (aka "fetch") feature in Jobtrack, your PHP executable has to be compiled with the IMAP extension. (see http://us2.php.net/imap for info on this extension) PHP-IMAP is what implements the imap_open() function. Since you don't have PHP-IMAP installed on your server, you're getting an "undefined function" error.

Question: Lots of people on managed hosting servers don't have PHP-IMAP. Do you know if anyone has written a Drupal extension that accomplishes the same thing (i.e. retrieving e-mail) without requiring PHP-IMAP? If so, it might be possible to patch Jobtrack to use that module instead of imap_*() functions.

Alternatively, Jobtrack could check to see if PHP-IMAP is installed and gracefully disallow configuring the fetch feature if it's missing (giving a nice error message like: "This feature requires PHP-IMAP extension to be installed on your server.") Otherwise, the fatal error can be quite confusing to users without PHP programming experience.

jeremy’s picture

Assigned: Unassigned » jeremy

As noted above, to use this module with mail functionality you will need to compile in PHP's mail functionality. If your host does not provide this, then you will not be able to use JobTrack to send email.

I will leave this open, as I agree that JobTrack should check if imap() is available and gracefully report this if missing.

Patches are welcome.

juroon’s picture

Just to clarify, Jeremy, Job Tracker is sending mail just fine for me. It's checking mail on a remote email that's the problem. Remote meaning it's a shared server and mail boxes are not managed there.

Gnorizo, thank you very much. I've been combing through the mail related modules and so far haven't found any with an alternative way to check mail.

The closest I have come is this: http://drupal.org/node/275926 which leads to something that might work.

Still looking for a situation where it has actually been accomplished...

jeremy’s picture

Correct, if you follow the link I provided, you'll see it's for IMAP and POP3, which are protocols used for receiving mail. And for that to work, you will need to compile in the support as described at the same link. The only bug here in the module is that it currently does not detect when this functionality is not available -- patches are welcome which should detect such a configuration and prevent the white screen you are getting by not calling functions that (in your case) do not exist.

To fully integrate Jobtrack with mail (meaning receiving in addition to sending) you will need to compile in IMAP support.

jeremy’s picture

Status: Active » Fixed

Fix committed, module will prevent user from enabling inbound email integration if imap extension is not available.

juroon’s picture

Thanks, Jeremy. Meanwhile I've changed hosting. Haven't had a chance to set up the mail yet, but looking forward to it. It's good to know it will be clear for the next person.

juroon’s picture

Thanks, Jeremy. Meanwhile I've changed hosting. Haven't had a chance to set up the mail yet, but looking forward to it. It's good to know it will be clear for the next person.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.