notify (God::Contacts::Email)

    # File lib/god/contacts/email.rb, line 45
          def notify(message, time, priority, category, host)
            begin
              body = Email.format.call(self.name, self.email, message, time, priority, category, host)

              args = [Email.server_settings[:address], Email.server_settings[:port]]
              if Email.server_settings[:authentication]
                args << Email.server_settings[:domain]
                args << Email.server_settings[:user_name]
                args << Email.server_settings[:password]
                args << Email.server_settings[:authentication]
              end

              Net::SMTP.start(*args) do |smtp|
                smtp.send_message body, Email.message_settings[:from], self.email
              end

              self.info = "sent email to #{self.email}"
            rescue => e
              puts e.message
              puts e.backtrace.join("\n")

              self.info = "failed to send email to #{self.email}: #{e.message}"
            end
          end