+/**
+ * detects if mailbox is part of sent_subfolders
+ *
+ * @param string $mb imap folder name
+ * @return boolean 1 - is part of sent_subfolders, 0 - is not part of sent_subfolders
+ */
+function sent_subfolders_special_mailbox($mb) {
+ global $data_dir, $username;
+
+ $use_sent_subfolders = getPref
+ ($data_dir, $username, 'use_sent_subfolders', SMPREF_OFF);
+ $sent_subfolders_base = getPref($data_dir, $username, 'sent_subfolders_base', 'na');
+
+ if ($use_sent_subfolders == SMPREF_ON &&
+ ($mb == $sent_subfolders_base || stristr($mb,$sent_subfolders_base) ) ) {
+ return 1;
+ }
+ return 0;
+}