Add ability to show login error from the IMAP server instead of traditional "Unknown...
[squirrelmail.git] / plugins / spamcop / functions.php
index f133484d9c3e13edf15d47472cc78c44d2bd5a37..5d0d4c668c32395e36650c96a706456211fe239b 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * SpamCop plugin - functions
  *
- * @copyright 1999-2012 The SquirrelMail Project Team
+ * @copyright 1999-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -134,12 +134,12 @@ function spamcop_options_function() {
  */
 function spamcop_while_sending_function() {
     global $mailbox, $spamcop_delete, $spamcop_save, $spamcop_is_composing, $auto_expunge,
-           $username, $imapServerAddress, $imapPort;
+           $username, $imapServerAddress, $imapPort, $imapSslOptions;
 
     if (sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing)) {
         // delete spam message
         if ($spamcop_delete) {
-            $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
+            $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions);
             sqimap_mailbox_select($imapConnection, $mailbox);
             sqimap_msgs_list_delete($imapConnection, $mailbox, array($spamcop_is_composing));
             if ($auto_expunge)