
27 Nov
2020
27 Nov
'20
4:58 p.m.
@@ -34,6 +34,16 @@ OS_MOUNT = %w[cifs initramfs].freeze
EMAIL_ADDRESS = (ENV['USER']).to_s.freeze
+def send_mail + message = File.read(LOG).chomp + data = " + subject: os rootfs test report + to: #{EMAIL_ADDRESS} + body: '#{message}'" + + %x(curl -X POST 'localhost:11311/send_mail_yaml' -d "#{data}")
11311 => LOCAL_SEND_MAIL_PORT
May be you can use mail_client.rb in lib.
good Thanks, Yinsi
Thanks, Xueliang
+end + def write_report(report_all) file = File.open(LOG, 'a') log = Logger.new(file, 'weekly') -- 2.23.0