In this repository is a Node.js project that uses Appwrite Functions to send emails users on a specific event.
- Clone this repo
- Customize the mail layouts in
/templates
and variables in/src/app.js
- Deploy the code as a function over the appwrite-cli
appwrite functions createDeployment \ --functionId=[YOUR_FUNCTION_ID] \ --activate=true \ --entrypoint="/src/app.js" \ --code="[/myrepo/myfunction]"
- Go to function Settings on your appwrite instance
- Select the Events:
users.update.email
,users.create
andusers.delete
. - Add important variables:
- MAIL_NAME : This is the name from the sender
- MAIL_ADRESS : mail adress from sender
- MAIL_PASSWORD : password to connect to mailserver
- MAIL_SMTP_HOST : SMTP Host
- MAIL_SMTP_PORT : SMTP Port
- Click on Update
- Select the Events:
Now, if a user is created, deleted or changed to a new email, he will receive an email about this event.
This project is licensed under GNU GPLv3