Add option to disable saving sent mail in Sent folder - no_save_sent_messages (#1488686)

pull/39/head
Aleksander Machniak 12 years ago
parent e377ed30d2
commit e04e314440

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Add option to disable saving sent mail in Sent folder - no_save_sent_messages (#1488686)
- Fix handling dont_override with message_sort_col and message_sort_order settings (#1488760)
- Fix HTML part detection in messages with attachments (#1488769)
- Fix bug where wrong words were highlighted on spell-before-send check

@ -182,6 +182,9 @@ $rcmail_config['smtp_timeout'] = 0;
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
$rcmail_config['enable_installer'] = false;
// don't allow these settings to be overriden by the user
$rcmail_config['dont_override'] = array();
// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$rcmail_config['support_url'] = '';
@ -349,9 +352,6 @@ $rcmail_config['line_length'] = 72;
// send plaintext messages as format=flowed
$rcmail_config['send_format_flowed'] = true;
// don't allow these settings to be overriden by the user
$rcmail_config['dont_override'] = array();
// Set identities access level:
// 0 - many identities with possibility to edit all params
// 1 - many identities with possibility to edit all params but not email address
@ -379,6 +379,10 @@ $rcmail_config['contact_photo_size'] = 160;
// Enable DNS checking for e-mail address validation
$rcmail_config['email_dns_check'] = false;
// Disables saving sent messages in Sent folder (like gmail) (Default: false)
// Note: useful when SMTP server stores sent mail in user mailbox
$rcmail_config['no_save_sent_messages'] = false;
// ----------------------------------
// PLUGINS
// ----------------------------------

@ -1528,6 +1528,11 @@ function rcmail_check_sent_folder($folder, $create=false)
{
global $RCMAIL;
// we'll not save the message, so it doesn't matter
if ($RCMAIL->config->get('no_save_sent_messages')) {
return true;
}
if ($RCMAIL->storage->folder_exists($folder, true)) {
return true;
}

@ -49,7 +49,7 @@ if (!$savedraft) {
if(!empty($CONFIG['sendmail_delay'])) {
$wait_sec = time() - intval($CONFIG['sendmail_delay']) - intval($CONFIG['last_message_time']);
if($wait_sec < 0) {
if ($wait_sec < 0) {
$OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1));
$OUTPUT->send('iframe');
}
@ -676,19 +676,18 @@ if (!$savedraft)
$smtp_error, $mailbody_file, $smtp_opts);
// return to compose page if sending failed
if (!$sent)
{
if (!$sent) {
// remove temp file
if ($mailbody_file) {
unlink($mailbody_file);
}
}
if ($smtp_error)
$OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
else
$OUTPUT->show_message('sendingfailed', 'error');
$OUTPUT->send('iframe');
}
}
// save message sent time
if (!empty($CONFIG['sendmail_delay']))
@ -706,7 +705,7 @@ if (!$savedraft)
// Determine which folder to save message
if ($savedraft)
$store_target = $CONFIG['drafts_mbox'];
else
else if (!$RCMAIL->config->get('no_save_sent_messages'))
$store_target = isset($_POST['_store_target']) ? get_input_value('_store_target', RCUBE_INPUT_POST) : $CONFIG['sent_mbox'];
if ($store_target) {

@ -143,10 +143,10 @@
</tr><tr>
<td><label for="rcmcomposepriority"><roundcube:label name="priority" />:</label></td>
<td><roundcube:object name="prioritySelector" form="form" id="rcmcomposepriority" /></td>
</tr><tr>
</tr><roundcube:if condition="!config:no_save_sent_messages" /><tr>
<td><label><roundcube:label name="savesentmessagein" />:</label></td>
<td><roundcube:object name="storetarget" maxlength="30" /></td>
</tr>
</tr><roundcube:endif />
</table>
</div>

@ -140,9 +140,11 @@
<span class="composeoption">
<label><roundcube:object name="dsnCheckBox" form="form" id="rcmcomposedsn" /> <roundcube:label name="dsn" /></label>
</span>
<roundcube:if condition="!config:no_save_sent_messages" />
<span class="composeoption">
<label><roundcube:label name="savesentmessagein" /> <roundcube:object name="storetarget" maxlength="30" style="max-width:12em" /></label>
</span>
<roundcube:endif />
<roundcube:container name="composeoptions" id="composeoptions" />
</div>
</div>

Loading…
Cancel
Save