✨ Add `disable_mail_sending` config parameter
This disable the ability to send mail through the server. Users need to use their own mail client.
This commit is contained in:
parent
295e660461
commit
5845f31836
|
@ -3,6 +3,7 @@ Revision history for Lufi
|
|||
?.??.? ????-??-??
|
||||
- 🔧 Set default morbo port to 3000 (as it should have stay)
|
||||
- 🐛 Fix `Notification not defined` in Duckduckgo browser (Fix #224 again)
|
||||
- ✨ Add `disable_mail_sending` config parameter
|
||||
|
||||
0.05.13 2021-01-28
|
||||
- 🐛 Fix latest git tag improperly fetched
|
||||
|
|
|
@ -232,7 +232,7 @@ sub startup {
|
|||
|
||||
# Submit mail
|
||||
$r->post('/m')
|
||||
->to('Mail#send_mail');
|
||||
->to('Mail#send_mail') unless $self->config('disable_mail_sending');
|
||||
|
||||
# Upload files websocket
|
||||
$r->websocket('/upload')
|
||||
|
|
|
@ -17,6 +17,7 @@ our $default_config = {
|
|||
how => 'sendmail'
|
||||
},
|
||||
mail_sender => 'no-reply@lufi.io',
|
||||
disable_mail_sending => 0,
|
||||
theme => 'default',
|
||||
upload_dir => 'files',
|
||||
session_duration => 3600,
|
||||
|
|
|
@ -166,6 +166,10 @@
|
|||
# optional, default to no-reply@lufi.io
|
||||
#mail_sender => 'no-reply@lufi.io',
|
||||
|
||||
# Disable sending mail through the server
|
||||
# optional, default is false
|
||||
#disable_mail_sending => 0,
|
||||
|
||||
#############
|
||||
# DB settings
|
||||
#############
|
||||
|
|
|
@ -43,7 +43,9 @@
|
|||
% }
|
||||
</textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info"><%= l('Send with this server') %></button>
|
||||
% if (!$self->config('disable_mail_sending')) {
|
||||
<button type="submit" class="btn btn-info"><%= l('Send with this server') %></button>
|
||||
% }
|
||||
<a href="#" class="btn btn-primary" id="mailto"><%= l('Send with your own mail software') %></a>
|
||||
</form>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue