#!/usr/bin/env ruby # coding: utf-8 require 'net/smtp' error "usage: #{$0} " if not (ARGV[0] and ARGV[1]) server = ARGV[0] user = ARGV[1] error "NETINFO_SMTP_PASSWD not set!" if not ENV['NETINFO_SMTP_PASSWD'] passwd = ENV['NETINFO_SMTP_PASSWD'] hostname = `hostname -f`.strip date = `date +%Y-%m-%d`.strip email_date = `date` ipinfo = `ip addr` message = <