# File lib/reap2/announce-task.rb, line 16
  def setup
    @address  = section['to']
    @from     = section['from'].to_s
    @server   = section['server'].to_s.strip
    @port     = section['port'] || 25
    @domain   = section['domain'].to_s.strip
    @account  = section['account'].to_s
    @authtype = section['authtype'].to_sym
    @tls      = section['tls'] ? true : false

    @title    = master['title']
    @version  = master['version']
    @summary  = master['summary']

    @subject  = "[ANN] #{@title}, v#{@version}"

    #raise "DOMAIN is a required field" if @domain.empty?

    # header
    announce = %Q{
      |
      |A N N O U N C I N G
      |
      |#{@title}, v#{@version}
      |
      |#{@summary}
      |
      }.margin.center_lines(66)

    # abstract
    abstract = ''
    desc = description
    if desc
      abstract << "\n\n"
      abstract << "ABSTRACT: #{desc}".word_wrap(72)
      abstract << "\n"
    end

    # more info
    info = ''
    info_arr = section['info']
    unless info_arr.empty?
      info << "\n"
      info << "For More Information".center(67)
      info << "\n"
      info_arr.each{ |mi| info << "#{mi}".center(67) }
      info << "\n\n"
    end

    # slogan
    slogan = ''
    if section['slogan']
      slogan << "\n\n"
      slogan << section['slogan'].center(67)
      slogan << "\n\n"
    end

    # memo
    memo = ''
    if section['memo']
      memo = ''
      memo << "\n" << ('-' * 72) << "\n"
      memo << "(Memo)\n\n"
      memo << section['memo'].fold.word_wrap(72)
      #memo << "\n"
    end

    # msg file
    msg = ''
    msg_file = section['file']
    if msg_file and File.file?( msg_file )
      msg << "\n" << ("-" * 72) << "\n"
      msg << "(from #{msg_file})\n\n"
      mg = ''
      File.open( msg_file ) { |f| mg << f.gets(nil) }
      msg << mg.fold.word_wrap(72)
    end

    # stamp
    stamp = ''
    stamp << "\n" << ("-" * 72) << "\n"
    stamp << %Q{
      |Generated by Reap, a dedicated Ruby Packaging Assistant.
      |Do you Ruby?  (http://www.ruby-lang.org)
      }.margin
    stamp << "\n\n"

    @message = ''
    @message << announce
    @message << abstract
    @message << info
    @message << slogan
    @message << memo
    @message << msg
    @message << stamp
  end