In order to verify this I used ICEpush Trunk in combination with NaaS due to its ease of the REST API.
- The deployment must contain the mail.jar, otherwise the EmailNotificationProvider doesn't get registered with the MainServlet's OutOfBandNotifier. I noticed the scheme used to register the EmailNotificationProvider is set to "mail", instead of the official "mailto" scheme. I think we should change this to "mailto".
- The web.xml must be configured with the appropriate SMTP configuration as follows:
<!--
Default: false
-->
<context-param>
<param-name>smtp.debug</param-name>
<param-value></param-value>
</context-param>
<!--
Default: localhost
-->
<context-param>
<param-name>smtp.host</param-name>
<param-value></param-value>
</context-param>
<!--
Default: 465 (if using TLS or SSL) or 25
-->
<context-param>
<param-name>smtp.port</param-name>
<param-value></param-value>
</context-param>
<!--
Default: nobody@localhost.com
-->
<context-param>
<param-name>smtp.from</param-name>
<param-value></param-value>
</context-param>
<!--
Default: <empty string>
-->
<context-param>
<param-name>smtp.user</param-name>
<param-value></param-value>
</context-param>
<!--
Default: <empty string>
-->
<context-param>
<param-name>smtp.password</param-name>
<param-value></param-value>
</context-param>
<!--
Default: NONE (other options are TLS or SSL)
-->
<context-param>
<param-name>smtp.security</param-name>
<param-value></param-value>
</context-param>
I used a dummy Gmail account without success and my ICEsoft account with success.
- At some point the listen request must contain a valid NotifyBackURI. In this case the e-mail address of the User. I'm not sure how this works or would work with the JavaScript Bridge, but to test I used the REST API of NaaS in order to achieve this. Basically,
POST http:Accept: application/json
Content-Type: application/json
{
"access_token": "<access-token>"
}
PUT http:Accept: application/json
Content-Type: application/json
{
"access_token": "<access-token>",
"browser": {
"id": "<browser-id>"
}
}
POST http:Accept: application/json
Content-Type: application/json
{
"access_token": "<access-token>",
"browser": {
"id": "<browser-id>"
},
"notify_back": {
"uri": "mail:<email-address>"
}
}
POST http:Accept: application/json
Content-Type: application/json
{
"access_token": "<access-token>",
"push_configuration": {
"subject": "<subject>",
"detail": "<detail>"
}
}
Though I got this to work with my ICEsoft account, I feel that the EmailNotificationProvider could use some attention to figure out why it didn't work with the Gmail account, test it with a non-ICEsoft and non-Gmail account, test it with SSL and NONE security options, and maybe provide a test (in our bundle) that utilizes the JavaScript Bridge in order to set the User's e-mail address from within the Browser for instance.
In order to verify this I used ICEpush Trunk in combination with NaaS due to its ease of the REST API.
I used a dummy Gmail account without success and my ICEsoft account with success.
Though I got this to work with my ICEsoft account, I feel that the EmailNotificationProvider could use some attention to figure out why it didn't work with the Gmail account, test it with a non-ICEsoft and non-Gmail account, test it with SSL and NONE security options, and maybe provide a test (in our bundle) that utilizes the JavaScript Bridge in order to set the User's e-mail address from within the Browser for instance.