details: https://code.openbravo.com/erp/devel/pi/rev/55ec291da794 changeset: 35040:55ec291da794 user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Tue Nov 20 10:58:55 2018 +0100 summary: fixes issue 39649: Cannot send mail using EmailEventManager
A NPE was being thrown when sending emails through the EmailEventManager because it was missing to send the email recipient diffstat: src/org/openbravo/email/EmailEventManager.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diffs (22 lines): diff -r f91e0086802d -r 55ec291da794 src/org/openbravo/email/EmailEventManager.java --- a/src/org/openbravo/email/EmailEventManager.java Tue Nov 20 09:55:43 2018 +0100 +++ b/src/org/openbravo/email/EmailEventManager.java Tue Nov 20 10:58:55 2018 +0100 @@ -91,11 +91,13 @@ sent = true; log.debug("sending email for event " + event + " with generator " + gen); - final EmailInfo email = new EmailInfo.Builder().setSubject(gen.getSubject(data, event)) - .setContent(gen.getBody(data, event)) - .setContentType(gen.getContentType()) - .setAttachments(gen.getAttachments(data, event)) - .build(); + final EmailInfo email = new EmailInfo.Builder() // + .setSubject(gen.getSubject(data, event)) // + .setRecipientTO(recipient) // + .setContent(gen.getBody(data, event)) // + .setContentType(gen.getContentType()) // + .setAttachments(gen.getAttachments(data, event)) // + .build(); if (gen.isAsynchronous()) { Thread thread = new Thread(new Runnable() { _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits