Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039650Openbravo ERPA. Platformpublic2018-11-20 10:462018-11-23 13:22
caristu 
caristu 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR18Q43.0PR18Q4 
alostale
Core
Packaging and release
2018-06-25
main
https://code.openbravo.com/erp/devel/pi/rev/cf4416b527d97adba57b97484b66a33284101738 [^]
No
0039650: Cannot send mail using EmailEventManager
Cannot send mail using EmailEventManager.

A NPE is raised in EmailManager line 225 when executing: transport.sendMessage(message, message.getAllRecipients()); See stack trace:

Caused by: java.lang.NullPointerException
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1265)
    at org.openbravo.erpCommon.utility.poc.EmailManager.sendEmail(EmailManager.java:225)
    at org.openbravo.erpCommon.utility.poc.EmailManager.sendEmail(EmailManager.java:69)
    at org.openbravo.email.EmailEventManager.sendEmail(EmailEventManager.java:113)
    ... 51 more
Create an event to send a mail following: http://wiki.openbravo.com/wiki/How_to_send_emails_on_events [^]
- Create an email event listener extending EmailEventContentGenerator class.
- Run EmailEventManager.sendEmail(String event, final String recipient, Object data)
- Check email is not sent

No tags attached.
blocks defect 0039649 closed caristu Cannot send mail using EmailEventManager 
Issue History
2018-11-20 10:46caristuNew Issue
2018-11-20 10:46caristuAssigned To => caristu
2018-11-20 10:46caristuModules => Core
2018-11-20 10:46caristuTriggers an Emergency Pack => No
2018-11-20 10:46caristuIssue generated from0039649
2018-11-20 10:46caristuRelationship addedblocks 0039649
2018-11-20 10:47caristuRegression level => Packaging and release
2018-11-20 10:47caristuRegression date => 2018-06-25
2018-11-20 10:47caristuRegression introduced in release => main
2018-11-20 10:47caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/cf4416b527d97adba57b97484b66a33284101738 [^]
2018-11-20 11:14hgbotCheckin
2018-11-20 11:14hgbotNote Added: 0108006
2018-11-20 11:14hgbotStatusnew => resolved
2018-11-20 11:14hgbotResolutionopen => fixed
2018-11-20 11:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q4/rev/874ba7f431a6174e122631e31ab1527c894cb23d [^]
2018-11-20 11:14caristuReview Assigned To => alostale
2018-11-23 13:22alostaleStatusresolved => closed
2018-11-23 13:22alostaleFixed in Version => 3.0PR18Q4

Notes
(0108006)
hgbot   
2018-11-20 11:14   
Repository: erp/backports/3.0PR18Q4
Changeset: 874ba7f431a6174e122631e31ab1527c894cb23d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 20 10:58:55 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q4/rev/874ba7f431a6174e122631e31ab1527c894cb23d [^]

fixes issue 39650: 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

---
M src/org/openbravo/email/EmailEventManager.java
---