From da8167fdf5c7d074b670a241c29f5ead949a9305 Mon Sep 17 00:00:00 2001 From: hack3r-0m Date: Mon, 26 Oct 2020 14:34:19 +0000 Subject: [PATCH 1/7] fixing vars for using external smtp --- .env | 15 +++++++++------ docker-compose.yml | 5 ++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 6583a94fc8..1c7e34b766 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ _APP_ENV=production _APP_ENV=development -_APP_SYSTEM_EMAIL_NAME=Appwrite -_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io -_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io +_APP_SYSTEM_EMAIL_NAME=self +_APP_SYSTEM_EMAIL_ADDRESS=self@omparikh.me +_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=self@omparikh.me _APP_OPTIONS_ABUSE=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key @@ -19,8 +19,11 @@ _APP_INFLUXDB_HOST=influxdb _APP_INFLUXDB_PORT=8086 _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 -_APP_SMTP_HOST=maildev -_APP_SMTP_PORT=25 +_APP_SMTP_HOST=smtp.sendgrid.net +_APP_SMTP_PORT=465 +_APP_SMTP_SECURE=ssl +_APP_SMTP_USERNAME= +_APP_SMTP_PASSWORD= _APP_STORAGE_LIMIT=100000000 _APP_FUNCTIONS_TIMEOUT=900 -_APP_FUNCTIONS_CONTAINERS=10 \ No newline at end of file +_APP_FUNCTIONS_CONTAINERS=10 diff --git a/docker-compose.yml b/docker-compose.yml index ad27815eb6..e595a6c373 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -266,6 +266,9 @@ services: - _APP_REDIS_PORT - _APP_SMTP_HOST - _APP_SMTP_PORT + - _APP_SMTP_SECURE + - _APP_SMTP_USERNAME + - _APP_SMTP_PASSWORD appwrite-schedule: entrypoint: schedule @@ -293,7 +296,7 @@ services: ports: - "3306:3306" environment: - - MYSQL_ROOT_PASSWORD=rootsecretpassword + - MYSQL_ROOT_PASSWORD=password - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} From d179a6b605a5d60e28dc9f4ea4c3adc0e47c6bab Mon Sep 17 00:00:00 2001 From: hack3r-0m <54898623+hack3r-0m@users.noreply.github.com> Date: Mon, 26 Oct 2020 07:45:46 -0700 Subject: [PATCH 2/7] Update .env --- .env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 1c7e34b766..d317f3365f 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ _APP_ENV=production _APP_ENV=development -_APP_SYSTEM_EMAIL_NAME=self -_APP_SYSTEM_EMAIL_ADDRESS=self@omparikh.me -_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=self@omparikh.me +_APP_SYSTEM_EMAIL_NAME=Appwrite +_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io +_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io _APP_OPTIONS_ABUSE=disabled _APP_OPTIONS_FORCE_HTTPS=disabled _APP_OPENSSL_KEY_V1=your-secret-key From 934715e16d31faa5cf850a830900b16b7c44fd9e Mon Sep 17 00:00:00 2001 From: hack3r-0m <54898623+hack3r-0m@users.noreply.github.com> Date: Mon, 26 Oct 2020 08:38:59 -0700 Subject: [PATCH 3/7] Create sendgrid-integration.md --- docs/deployment/sendgrid-integration.md | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/deployment/sendgrid-integration.md diff --git a/docs/deployment/sendgrid-integration.md b/docs/deployment/sendgrid-integration.md new file mode 100644 index 0000000000..d56980643d --- /dev/null +++ b/docs/deployment/sendgrid-integration.md @@ -0,0 +1,26 @@ +## INTEGRATING SENDGRID SMTP WITH APPWRITE + +### PREREQUISITES + +- Sendgird's email sending API key ([how to create api key](https://sendgrid.com/docs/ui/account-and-settings/api-keys/#creating-an-api-key)) +- Apprwrite repo/server locally + +### INTEGRATION + +- In root directory of repo, `.env` file is where you have to put your credentials of external smtp +- Edit the folowing values in `.env` file : + - `_APP_SYSTEM_EMAIL_NAME=` + - `_APP_SYSTEM_EMAIL_ADDRESS=`(make sure email you want to use is authenticated from your sendgrid account) + - `_APP_SMTP_HOST=smtp.sendgrid.net` + - `_APP_SMTP_PORT=465` + - `_APP_SMTP_SECURE=ssl` (If you want to use tls, change `_APP_SMTP_PORT` to 587) + - `_APP_SMTP_USERNAME=apikey` + - `_APP_SMTP_PASSWORD=` + +- build/re-build with `docker-compose build appwrite-worker-mails && docker-compose up -d` + +### DEBUG + +- check logs using `docker-compose logs appwrite-worker-mails` +- check vars used by smtp using `docker-compose exec appwrite-worker-mails vars` +- check your sendgrid's activity dashboard for more details From e001a1cf9ff176a169f69bbb4231abafa42ec5a7 Mon Sep 17 00:00:00 2001 From: hack3r-0m <54898623+hack3r-0m@users.noreply.github.com> Date: Mon, 26 Oct 2020 08:43:41 -0700 Subject: [PATCH 4/7] Update .env --- .env | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index d317f3365f..30b4a83f79 100644 --- a/.env +++ b/.env @@ -19,11 +19,11 @@ _APP_INFLUXDB_HOST=influxdb _APP_INFLUXDB_PORT=8086 _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 -_APP_SMTP_HOST=smtp.sendgrid.net -_APP_SMTP_PORT=465 -_APP_SMTP_SECURE=ssl -_APP_SMTP_USERNAME= -_APP_SMTP_PASSWORD= +_APP_SMTP_HOST=maildev +_APP_SMTP_PORT=25 +_APP_SMTP_SECURE= +_APP_SMTP_USERNAME= +_APP_SMTP_PASSWORD= _APP_STORAGE_LIMIT=100000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_CONTAINERS=10 From af268257adff19487e61a1560685f7dfdd21d6c2 Mon Sep 17 00:00:00 2001 From: hack3r-0m Date: Mon, 26 Oct 2020 15:50:05 +0000 Subject: [PATCH 5/7] Revert "Create sendgrid-integration.md" This reverts commit 934715e16d31faa5cf850a830900b16b7c44fd9e. --- docs/deployment/sendgrid-integration.md | 26 ------------------------- 1 file changed, 26 deletions(-) delete mode 100644 docs/deployment/sendgrid-integration.md diff --git a/docs/deployment/sendgrid-integration.md b/docs/deployment/sendgrid-integration.md deleted file mode 100644 index d56980643d..0000000000 --- a/docs/deployment/sendgrid-integration.md +++ /dev/null @@ -1,26 +0,0 @@ -## INTEGRATING SENDGRID SMTP WITH APPWRITE - -### PREREQUISITES - -- Sendgird's email sending API key ([how to create api key](https://sendgrid.com/docs/ui/account-and-settings/api-keys/#creating-an-api-key)) -- Apprwrite repo/server locally - -### INTEGRATION - -- In root directory of repo, `.env` file is where you have to put your credentials of external smtp -- Edit the folowing values in `.env` file : - - `_APP_SYSTEM_EMAIL_NAME=` - - `_APP_SYSTEM_EMAIL_ADDRESS=`(make sure email you want to use is authenticated from your sendgrid account) - - `_APP_SMTP_HOST=smtp.sendgrid.net` - - `_APP_SMTP_PORT=465` - - `_APP_SMTP_SECURE=ssl` (If you want to use tls, change `_APP_SMTP_PORT` to 587) - - `_APP_SMTP_USERNAME=apikey` - - `_APP_SMTP_PASSWORD=` - -- build/re-build with `docker-compose build appwrite-worker-mails && docker-compose up -d` - -### DEBUG - -- check logs using `docker-compose logs appwrite-worker-mails` -- check vars used by smtp using `docker-compose exec appwrite-worker-mails vars` -- check your sendgrid's activity dashboard for more details From 580c3fa8bc359c9c311ce0a7ca52dd6123d12d4b Mon Sep 17 00:00:00 2001 From: hack3r-0m <54898623+hack3r-0m@users.noreply.github.com> Date: Mon, 26 Oct 2020 09:02:03 -0700 Subject: [PATCH 6/7] Create sendgrid-integration.md --- docs/deployment/sendgrid-integration.md | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/deployment/sendgrid-integration.md diff --git a/docs/deployment/sendgrid-integration.md b/docs/deployment/sendgrid-integration.md new file mode 100644 index 0000000000..d56980643d --- /dev/null +++ b/docs/deployment/sendgrid-integration.md @@ -0,0 +1,26 @@ +## INTEGRATING SENDGRID SMTP WITH APPWRITE + +### PREREQUISITES + +- Sendgird's email sending API key ([how to create api key](https://sendgrid.com/docs/ui/account-and-settings/api-keys/#creating-an-api-key)) +- Apprwrite repo/server locally + +### INTEGRATION + +- In root directory of repo, `.env` file is where you have to put your credentials of external smtp +- Edit the folowing values in `.env` file : + - `_APP_SYSTEM_EMAIL_NAME=` + - `_APP_SYSTEM_EMAIL_ADDRESS=`(make sure email you want to use is authenticated from your sendgrid account) + - `_APP_SMTP_HOST=smtp.sendgrid.net` + - `_APP_SMTP_PORT=465` + - `_APP_SMTP_SECURE=ssl` (If you want to use tls, change `_APP_SMTP_PORT` to 587) + - `_APP_SMTP_USERNAME=apikey` + - `_APP_SMTP_PASSWORD=` + +- build/re-build with `docker-compose build appwrite-worker-mails && docker-compose up -d` + +### DEBUG + +- check logs using `docker-compose logs appwrite-worker-mails` +- check vars used by smtp using `docker-compose exec appwrite-worker-mails vars` +- check your sendgrid's activity dashboard for more details From 84f41c72add8014600aebf9f86191756b06a7e79 Mon Sep 17 00:00:00 2001 From: hack3r-0m Date: Mon, 26 Oct 2020 16:06:08 +0000 Subject: [PATCH 7/7] Revert "Create sendgrid-integration.md" This reverts commit 580c3fa8bc359c9c311ce0a7ca52dd6123d12d4b. --- docs/deployment/sendgrid-integration.md | 26 ------------------------- 1 file changed, 26 deletions(-) delete mode 100644 docs/deployment/sendgrid-integration.md diff --git a/docs/deployment/sendgrid-integration.md b/docs/deployment/sendgrid-integration.md deleted file mode 100644 index d56980643d..0000000000 --- a/docs/deployment/sendgrid-integration.md +++ /dev/null @@ -1,26 +0,0 @@ -## INTEGRATING SENDGRID SMTP WITH APPWRITE - -### PREREQUISITES - -- Sendgird's email sending API key ([how to create api key](https://sendgrid.com/docs/ui/account-and-settings/api-keys/#creating-an-api-key)) -- Apprwrite repo/server locally - -### INTEGRATION - -- In root directory of repo, `.env` file is where you have to put your credentials of external smtp -- Edit the folowing values in `.env` file : - - `_APP_SYSTEM_EMAIL_NAME=` - - `_APP_SYSTEM_EMAIL_ADDRESS=`(make sure email you want to use is authenticated from your sendgrid account) - - `_APP_SMTP_HOST=smtp.sendgrid.net` - - `_APP_SMTP_PORT=465` - - `_APP_SMTP_SECURE=ssl` (If you want to use tls, change `_APP_SMTP_PORT` to 587) - - `_APP_SMTP_USERNAME=apikey` - - `_APP_SMTP_PASSWORD=` - -- build/re-build with `docker-compose build appwrite-worker-mails && docker-compose up -d` - -### DEBUG - -- check logs using `docker-compose logs appwrite-worker-mails` -- check vars used by smtp using `docker-compose exec appwrite-worker-mails vars` -- check your sendgrid's activity dashboard for more details