In a business process, e-mail notifications are used when it is necessary to inform someone about the work progress. For instance, you can set up automatic order shipment notifications or send your customer a contract right after it is approved by your legal department. Also, you can use it to let your staff know when they are assigned an important task.
Please note that only users included in the Administrators group can set up e-mail notifications.
In order to enable e-mail notifications in a business process, you first have to configure connection settings. To do that, go to Administration -> System settings -> Email settings.
Select one of the available services:
other. In this case, you can specify your own SMTP server. Check the Send from Reply-to address option, if you want the sender's address to be replaced with the reply-to address.
Once you have specified the mail service, enter the login. The login is the email address that QuickBPM will use to send out emails. In the password field enter the password to this email.
Please note that these mailing services require additional verification if it is not yet enabled:
- Gmail: allow access to your account, allow less secure apps, then enable app password.
- Yahoo: in account settings, create an app password and use it for connection.
Outlook and Office365: go to additional security settings and enable additional security verification. Then go to App passwords and create a new password.
The table below lists possible errors that may appear when checking the connection if additional verification is disabled.
 org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.Gmail.com:587
 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials c21sm18730030qkm.8 - gsmtp
 530 5.7.0 Must issue a STARTTLS command first. x14sm29391461qtc.44 - gsmtp
 534-5.7.14 Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 hw7sm51688135pac.12 - gsmtp
 Sending the email to the following server failed : smtp.mail.yahoo.com:587
 535 5.7.0 (#AUTH005) Too many bad auth attempts.
Go to account settings, create an app password and use it for connection.
|outlook и office365|
Go to additional security settings and enable additional security verification. Then go to App passwords and create a new password
Do not forget to test the connection. When you do that, a message for confirming your details will be sent to your email specified in your user profile, not to the address that you have entered as the login.
If the connection was successful, you will see a notification.
If QuickBPM fails to establish the connection, you will also be notified.
When the connection is established, you can set up email notifications in business processes. To do that, drag the Email notification item to the process diagram. You will find it in the Integrations tab of the right menu.
Taking the Order fulfillment process as an example let's see how email notifications work. Once the order is packed and ready to be shipped, we have to notify the customer about it. Let's place the email notification element right after the Pick and pack task.
Double-click on the shape to open settings and fill out the form:
- To: enter one or several emails of notification recipients. You can also use a context variable, for example, contractor's email. In this case, the system will send the notification to the address specified on the page of the contractor who placed the order. To add a variable, click on the plus symbol + in the right corner of the field.
- Sender name: fill out this field, if you do not want the email address specified in system settings to appear in the notification as the sender's address. You can replace it, for instance, with the name QuickBPM or the name of your company.
- Reply address: by default, replies are sent to the address specified in system settings. If you wish for them to be sent to a different email, enter this email here.
- Subject: enter a short and informative subject, for instance, "Order is packed and awaiting shipment". Use a context variable to add the order's number if necessary. To add a variable, click on the plus symbol + in the right corner of the field.
- Message: enter all the necessary details. With process variables, you can add a list of purchased products, the total cost, expected delivery date and so on. To add a variable, click on the plus symbol + in the right corner of the field.
File: add one or several documents used in the order fulfillment process, for example, the packing slip and the invoice. These documents will be then attached to the email notification.
An error may occur when sending the notification, for example, if QuickBPM fails to determine the recipient's address. Decide how the system should behave in this case.
Go to the Error handling tab.
- Retry: enable this option if you want QuickBPM to try sending the notification again.
- Number of retries: how many attempts should the system make.
- Retry delay (sec): the amount of time QuickBOM should wait between attempts.
- Notification: select this option to inform particular users about the error. You can select the current executor, context variable, for example, the initiator, as well as a group or an org chart item. Please note that the current user is the person who completed the task located prior to the email notification shape on the diagram.
Interrupt: in case of an error, QuickBPM will not attempt to send the notification again and will resume the process. You need to select a connector to specify which process branch should be activated.
After you specify all the settings, click Save and publish the process.
Once the order is packed and ready for shipment, a notification will be sent to the customer's email. Here is how it might look: