<commit_before>package ch.romix.wichtel.rest;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;

import ch.romix.wichtel.model.Wichtel;
import ch.romix.wichtel.model.WichtelEvent;

public class WichtelMailSender {

  @Autowired
  private JavaMailSender mailSender;

  public void send(WichtelEvent event, Wichtel mailReceiver, Wichtel toBeWichteled) {

    System.out.println("mailSender: " + mailSender);

    MimeMessage message = mailSender.createMimeMessage();
    MimeMessageHelper helper = new MimeMessageHelper(message);
    try {
      helper.setFrom("<EMAIL>");
      helper.setTo(mailReceiver.getEmail());
      helper.setSubject("Wichteln für " + event.getName());
      StringBuilder text = new StringBuilder();<commit_msg>avoid useless System.out()<commit_after>package ch.romix.wichtel.rest;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;

import ch.romix.wichtel.model.Wichtel;
import ch.romix.wichtel.model.WichtelEvent;

public class WichtelMailSender {

  @Autowired
  private JavaMailSender mailSender;

  public void send(WichtelEvent event, Wichtel mailReceiver, Wichtel toBeWichteled) {
    MimeMessage message = mailSender.createMimeMessage();
    MimeMessageHelper helper = new MimeMessageHelper(message);
    try {
      helper.setFrom("<EMAIL>");
      helper.setTo(mailReceiver.getEmail());
      helper.setSubject("Wichteln für " + event.getName());
      StringBuilder text = new StringBuilder();
{'fraction_non_alphanumeric': 0.10064935064935066, 'fraction_numerical': 0.0, 'mean_word_length': 5.332191780821918, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4890240', 'n_tokens_mistral': 557, 'n_tokens_neox': 557, 'n_words': 99}