Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix POP3 email download bug (Issue #66) #69

Merged
merged 1 commit into from
Oct 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Upgrading from version 2.2 and from versions upwards
require_once(APP_INC_PATH."workflow/class.abstract_workflow_backend.php");
require_once(APP_INC_PATH."customer/class.abstract_customer_backend.php");
```
6. Update your cron jobs to point to the scripts in the new location (see INSTALL.md).
Previously the scripts were in 'crons', now in 'bin', eg:
0 * * * * <PATH-TO-EVENTUM>/bin/download_emails.php username_here mail.domain.com INBOX

Upgrading from versions before 2.2
----------------------------------
Expand Down
12 changes: 9 additions & 3 deletions lib/eventum/class.email_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// | along with this program; if not, write to: |
// | |
// | Free Software Foundation, Inc. |
// | 51 Franklin Street, Suite 330 |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com> |
Expand Down Expand Up @@ -123,9 +123,15 @@ public static function getAccountID($username, $hostname, $mailbox)
{{%email_account}}
WHERE
ema_username=? AND
ema_hostname=? AND
ema_folder=?';
ema_hostname=?';
try {
if (is_null($mailbox)) {
$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname));
} else {
$stmt .= ' AND ema_folder=?';
$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname, $mailbox));
}

$res = DB_Helper::getInstance()->getOne($stmt, array($username, $hostname, $mailbox));
} catch (DbException $e) {
return 0;
Expand Down