use new mailbox for mails than has been sent. it will enable read separately with mutt [why] the old path will not support to read separately for mutt with -f
[how] use a new mailbox to store the mails that have been sent
Signed-off-by: Luan Shengde shdluan@163.com --- container/send-internet-mail/send-internet-mail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/send-internet-mail/send-internet-mail.rb b/container/send-internet-mail/send-internet-mail.rb index 851904c..8fdaa0d 100755 --- a/container/send-internet-mail/send-internet-mail.rb +++ b/container/send-internet-mail/send-internet-mail.rb @@ -23,7 +23,7 @@ Mail.defaults { delivery_method :smtp, smtp } def store_email(mail) time_now = Time.new.strftime('%Y%m%d%H%M%S') file_name = [mail.to[0], time_now].join('_') - file_full_name = File.join(ENV['MAILDIR'], 'sent', file_name) + file_full_name = File.join(ENV['SENT_MAILDIR'], 'new', file_name) File.open(file_full_name, 'w') do |f| f.puts mail end