Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039649Openbravo ERPA. Platformpublic2018-11-20 09:352018-12-11 20:22
aferraz 
caristu 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q1 
alostale
Core
Packaging and release
2018-06-25
main
https://code.openbravo.com/erp/devel/pi/rev/cf4416b527d97adba57b97484b66a33284101738 [^]
No
0039649: 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.
depends on backport 00396503.0PR18Q4 closed caristu Cannot send mail using EmailEventManager 
caused by design defect 0038524 closed jarmendariz can't configure timeout for sending emails 
Issue History
2018-11-20 09:35aferrazNew Issue
2018-11-20 09:35aferrazAssigned To => platform
2018-11-20 09:35aferrazModules => Core
2018-11-20 09:35aferrazTriggers an Emergency Pack => No
2018-11-20 09:35aferrazRelationship addedcaused by 0038524
2018-11-20 09:44caristuAssigned Toplatform => caristu
2018-11-20 10:39caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17934#r17934
2018-11-20 10:40caristuDescription Updatedbug_revision_view_page.php?rev_id=17936#r17936
2018-11-20 10:40caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17937#r17937
2018-11-20 10:46caristuIssue cloned0039650
2018-11-20 10:46caristuRelationship addeddepends on 0039650
2018-11-20 10:48caristuRegression level => Packaging and release
2018-11-20 10:48caristuRegression date => 2018-06-25
2018-11-20 10:48caristuRegression introduced in release => main
2018-11-20 10:48caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/cf4416b527d97adba57b97484b66a33284101738 [^]
2018-11-20 11:02hgbotCheckin
2018-11-20 11:02hgbotNote Added: 0108005
2018-11-20 11:02hgbotStatusnew => resolved
2018-11-20 11:02hgbotResolutionopen => fixed
2018-11-20 11:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/55ec291da7947213c8994b9d41fd849813036c96 [^]
2018-11-20 16:18hgbotCheckin
2018-11-20 16:18hgbotNote Added: 0108013
2018-11-20 17:09hgbotCheckin
2018-11-20 17:09hgbotNote Added: 0108014
2018-11-20 17:16caristuNote Added: 0108015
2018-11-23 13:21hgbotCheckin
2018-11-23 13:21hgbotNote Added: 0108080
2018-11-23 13:22alostaleReview Assigned To => alostale
2018-11-23 13:22alostaleStatusresolved => closed
2018-11-23 13:22alostaleFixed in Version => 3.0PR19Q1
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108479
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108483
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108495

Notes
(0108005)
hgbot   
2018-11-20 11:02   
Repository: erp/devel/pi
Changeset: 55ec291da7947213c8994b9d41fd849813036c96
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 20 10:58:55 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/55ec291da7947213c8994b9d41fd849813036c96 [^]

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

---
M src/org/openbravo/email/EmailEventManager.java
---
(0108013)
hgbot   
2018-11-20 16:18   
Repository: erp/devel/pi
Changeset: 1d87a548b2e0e4026bb9351457b1b10a948c97b3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 20 16:16:56 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1d87a548b2e0e4026bb9351457b1b10a948c97b3 [^]

related to issue 39649: minor code improvements

  - Make anonymous inner Runnable a lambda
  - Use stream API to retrieve the valid e-mail generators

---
M src/org/openbravo/email/EmailEventManager.java
---
(0108014)
hgbot   
2018-11-20 17:09   
Repository: erp/mods/org.openbravo.platform.features
Changeset: 81095ca78e7d54bcaedc5d00c149fae1a32d7ad8
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 20 17:09:17 2018 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.platform.features/rev/81095ca78e7d54bcaedc5d00c149fae1a32d7ad8 [^]

related to issue 39649: added process definition to test e-mail events feature

---
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M src-db/database/sourcedata/OBUIAPP_PROCESS.xml
A src/org/openbravo/platform/features/email/EmailGenerator.java
A src/org/openbravo/platform/features/process/SendEmailActionHandler.java
---
(0108015)
caristu   
2018-11-20 17:16   
Added new test in TestLink: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-11026 [^]
(0108080)
hgbot   
2018-11-23 13:21   
Repository: erp/devel/pi
Changeset: e0749d9a2b2588663c8a7dbf451b2e2e3c96cfd9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Nov 23 13:21:32 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e0749d9a2b2588663c8a7dbf451b2e2e3c96cfd9 [^]

related to bug 39649: small refactors
  - removed redundant comments
  - no need to define small method to invoke from lambda
  - added some context to log

---
M src/org/openbravo/email/EmailEventManager.java
---
(0108479)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108483)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108495)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test