Fix NPE in EmailTemplate

EmailTemplate was passing replyTo to all calls to templatesToAddressList

Original commit: elastic/x-pack-elasticsearch@5ecc05e3f7
This commit is contained in:
Brian Murphy 2015-04-13 12:30:57 -04:00
parent 05dbbbdc48
commit 9b1d8fd3e6
1 changed files with 3 additions and 3 deletions

View File

@ -94,15 +94,15 @@ public class EmailTemplate implements ToXContent {
builder.priority(Email.Priority.resolve(engine.render(priority, model)));
}
if (to != null) {
Email.AddressList addresses = templatesToAddressList(engine, replyTo, model);
Email.AddressList addresses = templatesToAddressList(engine, to, model);
builder.to(addresses);
}
if (cc != null) {
Email.AddressList addresses = templatesToAddressList(engine, replyTo, model);
Email.AddressList addresses = templatesToAddressList(engine, cc, model);
builder.cc(addresses);
}
if (bcc != null) {
Email.AddressList addresses = templatesToAddressList(engine, replyTo, model);
Email.AddressList addresses = templatesToAddressList(engine, bcc, model);
builder.bcc(addresses);
}
if (subject != null) {