Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
1fe4e3af
Unverified
Commit
1fe4e3af
authored
Jan 10, 2024
by
Benjamin
Committed by
GitHub
Jan 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Resend SDK and resend api url in configuration. (#1963)
parent
9dee9e7a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
2 deletions
+11
-2
.env.example
api/.env.example
+1
-0
config.py
api/config.py
+1
-0
ext_mail.py
api/extensions/ext_mail.py
+6
-1
requirements.txt
api/requirements.txt
+1
-1
docker-compose.yaml
docker/docker-compose.yaml
+2
-0
No files found.
api/.env.example
View file @
1fe4e3af
...
...
@@ -86,6 +86,7 @@ MULTIMODAL_SEND_IMAGE_FORMAT=base64
MAIL_TYPE=
MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify.ai>
RESEND_API_KEY=
RESEND_API_URL=https://api.resend.com
# Sentry configuration
SENTRY_DSN=
...
...
api/config.py
View file @
1fe4e3af
...
...
@@ -219,6 +219,7 @@ class Config:
self
.
MAIL_TYPE
=
get_env
(
'MAIL_TYPE'
)
self
.
MAIL_DEFAULT_SEND_FROM
=
get_env
(
'MAIL_DEFAULT_SEND_FROM'
)
self
.
RESEND_API_KEY
=
get_env
(
'RESEND_API_KEY'
)
self
.
RESEND_API_URL
=
get_env
(
'RESEND_API_URL'
)
# ------------------------
# Workpace Configurations.
...
...
api/extensions/ext_mail.py
View file @
1fe4e3af
...
...
@@ -22,6 +22,11 @@ class Mail:
if
not
api_key
:
raise
ValueError
(
'RESEND_API_KEY is not set'
)
api_url
=
app
.
config
.
get
(
'RESEND_API_URL'
)
if
not
api_url
:
raise
ValueError
(
'RESEND_API_URL is not set'
)
resend
.
api_url
=
api_url
resend
.
api_key
=
api_key
self
.
_client
=
resend
.
Emails
else
:
...
...
api/requirements.txt
View file @
1fe4e3af
...
...
@@ -34,7 +34,7 @@ openpyxl==3.1.2
chardet~=5.1.0
docx2txt==0.8
pypdfium2==4.16.0
resend~=0.
5.1
resend~=0.
7.0
pyjwt~=2.6.0
anthropic~=0.7.7
newspaper3k==0.2.8
...
...
docker/docker-compose.yaml
View file @
1fe4e3af
...
...
@@ -111,6 +111,7 @@ services:
MAIL_DEFAULT_SEND_FROM
:
'
YOUR
EMAIL
FROM
(eg:
no-reply
<no-reply@dify.ai>)'
# the api-key for resend (https://resend.com)
RESEND_API_KEY
:
'
'
RESEND_API_URL
:
https://api.resend.com
# The DSN for Sentry error reporting. If not set, Sentry error reporting will be disabled.
SENTRY_DSN
:
'
'
# The sample rate for Sentry events. Default: `1.0`
...
...
@@ -191,6 +192,7 @@ services:
MAIL_DEFAULT_SEND_FROM
:
'
YOUR
EMAIL
FROM
(eg:
no-reply
<no-reply@dify.ai>)'
# the api-key for resend (https://resend.com)
RESEND_API_KEY
:
'
'
RESEND_API_URL
:
https://api.resend.com
depends_on
:
-
db
-
redis
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment