This workspace contains the Mail Form App for IXON Cloud. Users can fill out this form to send a message to a fixed email address, making it a simple way to submit a service request.
The UI Component side of the project is based on the IXON Cloud UI Component Development Kit, while the Cloud function side of the project is based on the IXON Cloud Backend Component Workspace. For more information, consult the respective documentation articles linked above.
Note that this app is built with Svelte, Typescript, SCSS and Python. It requires you to be familiar with the Node.js ecosystem.
Below you will find the following sections:
- Prerequisite
- Testing locally
- Step 1 - Running the UI Component
- Step 1 - Running the Cloud Function
- Additional Documentation
- Context config
To use the Mail Form app, you need to have an SMTP server that supports basic authentication and is using SSL (e.g. Google SMTP). This app does not support OAuth2 as an authentication method to authenticate with the SMTP server. The SMTP server of Outlook requires OAuth2 and is therefore not supported.
To test this project locally, you will have to run both the UI Component (Frontend) part for visualization and the Cloud Function (Backend) for the logic.
Please note: before you proceed with the following steps, make sure to set up both the frontend and the backend environments correctly by reading the documentation. This is necessary to ensure that you can start the whole development environment: not doing so might result in some of the following commands not working.
To run the UI Component, open a WSL Terminal in your IDE and run the following commands:
Install the dependencies:
npm installLogin to your IXON Cloud account:
npx cdk loginFinally, run the Simulator:
npx cdk simulate mail-formThis opens the Simulator app in a browser and builds the component in watch-mode, which means that any changes to the component source files will trigger a rebuild and will auto-reload the simulator.
To run the Cloud Function, open another WSL Terminal in your IDE and use the following command:
make runNo additional commands are required, as this is automatically sets up your virtual environment, installs dependencies and runs the IXON CDK Ingress. You can read more about it in this documentation article.
To check out docs and examples on how to develop an App and get more knowledge about the SDKs, visit the documentation links provided in the previous sections.
Additionally, the @ixon-cdk/runner page has a complete overview of all commands that can be run in a component workspace project.
Here you can find an example of the needed configuration. To set up the app's configuration, follow the instructions found in the Mail Form marketplace page under the "How to install" section.
{
"values": {
"smtp_server": "smtp.gmail.com",
"smtp_ssl_port": "465",
"smtp_user": "[email protected]",
"smtp_password": ""
}
}