-
Notifications
You must be signed in to change notification settings - Fork 164
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
Dirty fix for 500 on outgoing mail #651
Conversation
I need validation from @jasonmunro or @henrique-borba |
modules/smtp/modules.php
Outdated
@@ -1033,7 +1033,7 @@ protected function output() { | |||
$cc = $imap_draft['Cc']; | |||
} | |||
if (array_key_exists('From', $imap_draft)) { | |||
$from = $imap_draft['From']; | |||
$from = $imap_draft['From'];select_mailbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably accidentally pasted select_mailbox
at the end of this line - it will generate a syntax error, can you remove please?
modules/smtp/modules.php
Outdated
@@ -1573,7 +1574,7 @@ function rrmdir($dir) { | |||
if (filetype($dir . "/" . $object) == "dir") { | |||
rrmdir($dir . "/" . $object); | |||
} else { | |||
unlink($dir . "/" . $object); | |||
unlink($dir . "/" . $object);select_mailbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably accidentally pasted select_mailbox
at the end of this line - it will generate a syntax error, can you remove please?
modules/smtp/modules.php
Outdated
@@ -1528,6 +1528,7 @@ function get_primary_recipient($profiles, $headers, $smtp_servers, $is_draft=Fal | |||
if (!hm_exists('delete_draft')) { | |||
function delete_draft($id, $cache, $imap_server_id, $folder) { | |||
$imap = Hm_IMAP_List::connect($imap_server_id); | |||
if ( ! $imap ) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a result of incorrectly setup imap server which is used in a profile but cannot be authenticated (wrong password maybe). At any rate, I agree we should check if imap is authenticated before trying to select a mailbox. Can you use this, instead:
if (! imap_authed($imap)) {
return false;
}
@capocasa We'll soon release Cypht 1.4.0, and it would be ideal to get this fix in. Thanks! |
@capocasa We need you :-) |
I'm afraid I don't have a setup ready at the moment- perhaps try to reproduce on a vanilla debian install? |
Pullrequest
There is a hard-to-reproduce bug that was first reported on gitter and now by me here on github, #650
This is not a clean fix in that it does not addres root causes, but it allows me to use the software right now apparently without issue and might give additional information.
Issues
Checklist
How2Test
Reproduce bug #650 and watch it go away with this patch.
Todo