}
private void sendConfirmationMail(Transaction transaction)
{
Personne personne = transaction.getPersonne();
Compte compte = personne.getCompte();
if (compte == null)
{
throw new HypotheseException("Une personne a effectué "
+ "une transaction sans avoir de compte. ");
}
Map model = new HashMap();
model.put("transaction", transaction);
model.put("resources", ResourceBundle.getBundle("mail-paiement"));
model.put("conditions", ResourceBundle.getBundle(
"org/xrace/XRaceApplication").getString("Global.conditions")
.replaceAll("\\n", "<p/>"));
model.put("policyTitle", ResourceBundle.getBundle(
"org/xrace/XRaceApplication").getString("Global.policyTitle")
.replaceAll("\\n", "<p/>"));
model.put("policy", ResourceBundle.getBundle(
"org/xrace/XRaceApplication").getString("Global.policy")
.replaceAll("\\n", "<p/>"));
MimeMailMessage mail = new MimeMailMessage(mailSender
.createMimeMessage());
mail.setTo(compte.getUsername());
mail.setFrom("inscriptions@fqsc.net");
mail.setSubject("FQSC - Inscriptions en ligne - "
+ "Reçu de transaction");
// notificationTemplate.vm must be in your classpath