#{subject}
Attached as HTML file to this email
Generated by Hyla Tool
Remark : html Link works with Thunderbird, Gmail clients but not using Zimbra Web Client
module Hyla module Commands class Sendmail < Command def self.process(args, options) location = options[:location] if check_mandatory_option?('-s / --location', options[:location]) file_name = options[:file] if check_mandatory_option?('-f / --file', options[:file]) email_attributes = options[:email_attributes] if check_mandatory_option?('-e / --email_attributes', options[:email_attributes]) sender = email_attributes[:from] recipients = email_attributes[:to] subject = email_attributes[:subject] file_path = [location, file_name] * '/' # Parameters used to connect to the SMTP Server @smtp_server = email_attributes[:smtp_server] if check_mandatory_option?(':smtp_server not defined in _config.yaml file', email_attributes[:smtp_server]) @port_number = email_attributes[:port] if check_mandatory_option?(':port not defined in _config.yaml file', email_attributes[:port]) @user = email_attributes[:user] @password = email_attributes[:password] @authentication = email_attributes[:authentication] @enable_starttls = email_attributes[:enable_starttls] if check_mandatory_option?(':enable_start_tls not defined in _config.yaml file', email_attributes[:enable_starttls]) body = <<-EOS
Attached as HTML file to this email
Generated by Hyla Tool
Remark : html Link works with Thunderbird, Gmail clients but not using Zimbra Web Client