You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Follow the instructions below to add a user:
Configure the email settings to send out an invitation for users to register their device with WSO2 IoTS.
Click here for more information on configuring the email settings.
Create an email account to send out emails to users that register with IoT Server (e.g., no-reply@foo.com).
Open the <IOTS_HOME>/repository/conf/axis2/axis2.xml
file, uncomment the mailto transportSender
section, and configure the IoTS email account.
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.user">synapse.demo.0</parameter>
<parameter name="mail.smtp.password">mailpassword</parameter>
<parameter name="mail.smtp.from">synapse.demo.0@gmail.com</parameter>
</transportSender>
Example:
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.user">foo</parameter>
<parameter name="mail.smtp.password">$foo1234</parameter>
<parameter name="mail.smtp.from">no-reply@foo.com</parameter>
</transportSender>
Optionally, configure the email sender thread pool.
Navigate to the email-sender-config.xml
file, which is in the <IOTS_HOME>/repository/conf/etc
directory, and configure the following fields under <EmailSenderConfig>
.
MinThreads
: Defines the minimum number of threads that needs to be available in the underlying thread pool when the email sender functionality is initialized.
MaxThreads
: Defines the maximum number of threads that should serve email sending at any given time.
KeepAliveDuration
: Defines the duration a connection should be kept alive. If the thread pool has initialized more connections than what was defined in MinThreads
, and they have been idle for more than the KeepAliveDuration
, those idle connections will be terminated
ThreadQueueCapacity
: Defines the maximum concurrent email sending tasks that can be queued up.
Example:
<EmailSenderConfig>
<MinThreads>8</MinThreads>
<MaxThreads>100</MaxThreads>
<KeepAliveDuration>20</KeepAliveDuration>
<ThreadQueueCapacity>1000</ThreadQueueCapacity>
</EmailSenderConfig>
Optionally, customize the email templates that are in the <IOTS_HOME>/repository/resources/email-templates
directory.
- Open the email template that you wish to edit based on the requirement, such as the
user-invitation.vm
or user-registration.vm
file. - Edit the
<Subject>
and <Body>
to suit your requirement. - Restart WSO2 IoT Server.
- Sign in to the WSO2 IoTS device management console.
- Click Add under USERS to add a new user.
Provide the required details and click Add User.
User Stores: Provide the user store type from the list of items.
User Name: Provide the user name.
First Name: Provide the first name of the user.
Last Name: Provide the last name of the user.
Email Address: Provide the email address of the user.
User Roles: Provide the user roles for the respective user.