-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.1, 3.0.5
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MOODLE_30_STABLE, MOODLE_31_STABLE
-
MDL-51242-master -
I'm unsure if this is a Moodle bug or a Horde bug. I'm just not familiar enough with the call sequence to know where the variable is getting changed.
Steps to reproduce:
- Moodle 2.9.1 running on PHP 5.5.3 with incoming mail functioning. (Gmail, if that matters)
- Change PHP version to 5.6 (May also happen on 5.6 install)
Expected behavior:
Incoming mail continues to work
Actual behavior:
Incoming mail in cron fails with "error connecting to mail server"
Research
In 'lib/horde/framework/Horde/Socket/Client.php' the function _connect is receiving the host as "imap.gmail.com:993" and the port as "993", resulting in a final url of ssl://imap.google.com:993:993, which fails. Manually overriding $host and $port corrects the problem.
Next steps
I have no idea where _connect is being called from, and honestly I'm not sure how to research it myself. I'd assume it's part of the incoming mail portion, but I don't know the module well enough to know where, and I don't have a stack trace available.