Topics Map > Getting Started
LCS - Email set-up within an application
For emails sent out of any Betty Blocks application to come from an @wisc.edu email address instead of bettyblocks.com, these steps will need to be taken to send an email notification.
- SMTP credentials
- Action button added to a page
- Edit the new action
- Edit the Expression
- Edit the Sub action
- Add the variables for the outgoing email
- Return to the page with the action button
SMTP credentials
- The service team will set up a configuration with the SMTP credentials which will be encrypted allowing emails to be sent from an @wisc.edu email address.
Action button added to a page
- Add an Action button to a page to send email. (This could be a Submit button after filling out a form. In this example, the button will be labeled Send Email)
- Select Edit to edit the new action button.
Edit the new action
- Select Settings to change the name of the new action (e.g. Send email) and the description
- Edit the Permission settings to determine what roles can perform the action.
- Pull in an Expression into the Send email action.
- Pull in a Sub action into the Send email action.
Edit the Expression
- Add the email body text to the expression.
- Select the Output type as Text.
- If you use Text, everything must be in quotes, such as "Enter text here"+" "+"[{first_name}]".
- See Betty Blocks documentation on how to use Expressions.
- Add "email_body" for As Text for the variable.
- Save
Edit the Sub action
- Within the sub action, select which action to use.
Select the Send Email Sub action from the list.
Add the variables for the outgoing email
- Within the Sub action, there are multiple input variables. You may want to set up a email configuration that has different values per Sandbox and Production environments.
- See BB documentation on how to use configurations.
- For example, in Dev sandbox, you may want to use your own email as the recipient_email or reply_to_email, whereas for Production, you may want to use your HR departmental email.
- Create a new configuration from Tools.
- Name it (e.g. Email)
- Select either Set if you want to enter more than one variable with a value, or Single if you only have one variable with a value. The example below has 2 different variables, recipent_email and reply_to_email.
- Within the action, select the (x) next to the input variable, and select the Email configuration.
- From Email configuration, select the appropriate configuration item and the value added in configurations will be utilized.
- The configuration can be merged into other sandbox and Production environments, but the values will need to be added for each new environment.
- Add the variables for the outgoing email.
- Recipient_name: Either use a variable or the recipient's name if static. This is the person's name who receives the email from the application.
- Recipent_email: Either use a variable or the recipient’s email address if static. This is the person's email address who receives the email from the application.
- Reply_to_email:
- The email address sending out the email will be no-reply-low-code-solutions@wisc.edu. You will not be able to check reply emails to this address.
- Therefore, if the recipient of the email, clicks "reply" and you want to view/check any replies, enter the appropriate reply to email address.
- Cc_email: If N/A remove from the list, otherwise use a variable email address or enter a static email address.
- Subject: Subject of the outgoing email.
- Body: Select the variable of email_body just added in the expression for the email body text.
- Save
Return to the page with the action button
- Once the action is complete, select the arrow to the left of the Send email action name to go back to the page and the action button should look something like this.