mail_to (ActionView::Helpers::UrlHelper)

    # File lib/action_view/helpers/url_helper.rb, line 208
          def mail_to(email_address, name = nil, html_options = {})
            html_options = html_options.stringify_keys
            encode = html_options.delete("encode")
            cc, bcc, subject, body = html_options.delete("cc"), html_options.delete("bcc"), html_options.delete("subject"), html_options.delete("body")

            string = ''
            extras = ''
            extras << "cc=#{CGI.escape(cc).gsub("+", "%20")}&" unless cc.nil?
            extras << "bcc=#{CGI.escape(bcc).gsub("+", "%20")}&" unless bcc.nil?
            extras << "body=#{CGI.escape(body).gsub("+", "%20")}&" unless body.nil?
            extras << "subject=#{CGI.escape(subject).gsub("+", "%20")}&" unless subject.nil?
            extras = "?" << extras.gsub!(/&?$/,"") unless extras.empty?

            email_address_obfuscated = email_address.dup
            email_address_obfuscated.gsub!(/@/, html_options.delete("replace_at")) if html_options.has_key?("replace_at")
            email_address_obfuscated.gsub!(/\./, html_options.delete("replace_dot")) if html_options.has_key?("replace_dot")

            if encode == 'javascript'
              tmp = "document.write('#{content_tag("a", name || email_address, html_options.merge({ "href" => "mailto:"+email_address.to_s+extras }))}');"
              for i in 0...tmp.length
                string << sprintf("%%%x",tmp[i])
              end
              "<script type=\"text/javascript\">eval(unescape('#{string}'))</script>"
            elsif encode == 'hex'
              for i in 0...email_address.length
                if email_address[i,1] =~ /\w/
                  string << sprintf("%%%x",email_address[i])
                else
                  string << email_address[i,1]
                end
              end
              content_tag "a", name || email_address_obfuscated, html_options.merge({ "href" => "mailto:#{string}#{extras}" })
            else
              content_tag "a", name || email_address_obfuscated, html_options.merge({ "href" => "mailto:#{email_address}#{extras}" })
            end
          end