 
             mail.addPersonalization(personalization)
 
+            # dbg("sending email to #{opts.to} data -- #{misc.to_json(mail.toJSON())}")
+
             # Sendgrid V3 API
             request = email_server.emptyRequest
                                         method  : 'POST'

        dbg = (m) -> winston.debug("send_email(to:#{opts.to}) -- #{m}")
    else
        dbg = (m) ->
    dbg(opts.body)

    if is_banned(opts.to) or is_banned(opts.from)
        dbg("WARNING: attempt to send banned email")

    token_url   = "#{DOMAIN_NAME}#{endpoint}?#{token_query}"

    if opts.only_verify
        subject  = "Verify your email address on #{SITE_NAME} (#{DNS})"
        body     = verify_email_html(token_url)
        category = 'verify'
    else
        subject  = "Welcome to #{SITE_NAME} - #{DNS}"
        body     = welcome_email_html(token_url)
        category = 'welcome'

    # exports... because otherwise stubbing in the test suite of send_email would not work
    exports.send_email
