<commit_before>package oxalis.mail

import views._
import models.user.User
import play.api.Play
import play.api.i18n.Messages
import com.scalableminds.util.mail.Mail

object DefaultMails {
  /**
   * Configuration used for settings
   */
  val conf = play.api.Play.current.configuration

  /**
   * Base url used in emails
   */
  val uri = conf.getString("http.uri") getOrElse ("http://localhost")

  val defaultFrom = "<EMAIL>"

  val brainTracingMailingList = conf.getString("braintracing.mailinglist") getOrElse ("")
  val supportMail = conf.getString("scm.support.mail") getOrElse ("<EMAIL>")
  /**
   * Creates a registration mail which should allow the user to verify his
   * account
   */
  def registerAdminNotifyerMail(name: String, email: String, brainDBResult: String) =
    Mail(
      from = email,
      headers = Map("Sender" -> defaultFrom),
      subject = "A new user (" + name + ") registered on oxalis.at",
      bodyText = html.mail.registerAdminNotify(name, brainDBResult).body,
      recipients = List("<EMAIL>"))

  def registerMail(name: String, receiver: String, brainDBresult: String) =
    Mail(
      from = defaultFrom,
      subject = "Thanks for your registration on " + uri,
      bodyText = html.mail.register(name, Messages(brainDBresult)).body,
      recipients = List(receiver))

  def verifiedMail(name: String, receiver: String) =
    Mail(
      from = defaultFrom,
      subject = "Your account on " + uri + "got activated",
      bodyText = html.mail.validated(name).body,
      recipients = List(receiver))

  def issueMail(userName: String, email: String, summary: String, description: String) =<commit_msg>changed email address to @webknossos<commit_after>package oxalis.mail

import views._
import models.user.User
import play.api.Play
import play.api.i18n.Messages
import com.scalableminds.util.mail.Mail

object DefaultMails {
  /**
   * Configuration used for settings
   */
  val conf = play.api.Play.current.configuration

  /**
   * Base url used in emails
   */
  val uri = conf.getString("http.uri") getOrElse ("http://localhost")

  val defaultFrom = "<EMAIL>"

  val brainTracingMailingList = conf.getString("braintracing.mailinglist") getOrElse ("")
  val supportMail = conf.getString("scm.support.mail") getOrElse ("<EMAIL>")
  /**
   * Creates a registration mail which should allow the user to verify his
   * account
   */
  def registerAdminNotifyerMail(name: String, email: String, brainDBResult: String) =
    Mail(
      from = email,
      headers = Map("Sender" -> defaultFrom),
      subject = "A new user (" + name + ") registered on oxalis.at",
      bodyText = html.mail.registerAdminNotify(name, brainDBResult).body,
      recipients = List("<EMAIL>"))

  def registerMail(name: String, receiver: String, brainDBresult: String) =
    Mail(
      from = defaultFrom,
      subject = "Thanks for your registration on " + uri,
      bodyText = html.mail.register(name, Messages(brainDBresult)).body,
      recipients = List(receiver))

  def verifiedMail(name: String, receiver: String) =
    Mail(
      from = defaultFrom,
      subject = "Your account on " + uri + "got activated",
      bodyText = html.mail.validated(name).body,
      recipients = List(receiver))

  def issueMail(userName: String, email: String, summary: String, description: String) =
{'fraction_non_alphanumeric': 0.11985581255632322, 'fraction_numerical': 0.0012015620306398318, 'mean_word_length': 3.5804676753782667, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '649899', 'n_tokens_mistral': 995, 'n_tokens_neox': 972, 'n_words': 268}