Skip to content

travelventures/dl-appwrite-usermail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Appwrite Function

deine-Landschaft Appwrite mail function

In this repository is a Node.js project that uses Appwrite Functions to send emails users on a specific event.

Installation

  1. Clone this repo
  2. Customize the mail layouts in /templates and variables in /src/app.js
  3. 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]"
  4. Go to function Settings on your appwrite instance
    • Select the Events: users.update.email, users.create and users.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

Now, if a user is created, deleted or changed to a new email, he will receive an email about this event.

License

This project is licensed under GNU GPLv3