In my last post I explained how to create a subscription. I also mentioned that there exists different types of notification and promised to explain them in proceeding posts.
So here as promised. Lets try out email notifications in this post.
1. As the first step we need to enable mail transport in axis2.xml. In latest carbon products this file is appearing in CARBON_HOME/repository/conf/axis2.
Open axis2.xml and uncomment mail transport receiver and sender like this.
2. Restart the server after changing axis2.xml
3. Now login to Management Console, navigate to a resource that you need to subscribe for email notifications.
For the demonstration I am navigating to the same folder that I used in the previous example.
I am creating a child folder in it as am also going to show you how you would receive notifications on the changes\updates happened to child folders as well.
So here is my structure in registry.
4. Let's subscribe. In my scenario; I will subscribe to /_system/yumani_images/ to track LC creation. I will be having a hierarchical subscription.
5. Having subscribed; Now lets test it. Let's add a life-cycle to a child within the collection "yumani_images". Below is a view from the 'Notifications' list.
After adding the life-cycle you should get an email to the mail id that you used while subscribing.
Since I had a hierarchical subscription I got a notification over an event (life-cycle inclusion) that happened to a child level resource.
So here as promised. Lets try out email notifications in this post.
1. As the first step we need to enable mail transport in axis2.xml. In latest carbon products this file is appearing in CARBON_HOME/repository/conf/axis2.
Open axis2.xml and uncomment mail transport receiver and sender like this.
synapse.demo.1@gmail.com synapse.demo.1 mailpassword smtp.gmail.com 587 true true
2. Restart the server after changing axis2.xml
3. Now login to Management Console, navigate to a resource that you need to subscribe for email notifications.
For the demonstration I am navigating to the same folder that I used in the previous example.
I am creating a child folder in it as am also going to show you how you would receive notifications on the changes\updates happened to child folders as well.
So here is my structure in registry.
4. Let's subscribe. In my scenario; I will subscribe to /_system/yumani_images/ to track LC creation. I will be having a hierarchical subscription.
5. Having subscribed; Now lets test it. Let's add a life-cycle to a child within the collection "yumani_images". Below is a view from the 'Notifications' list.
After adding the life-cycle you should get an email to the mail id that you used while subscribing.
Since I had a hierarchical subscription I got a notification over an event (life-cycle inclusion) that happened to a child level resource.