Skip to content

Commit

Permalink
Fixed minor issues with email.
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaygill committed Nov 9, 2024
1 parent ef94f70 commit 154a20d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/api_project/api_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,12 @@ def get_server_status(request):
@permission_classes([IsAuthenticated])
def send_peer_email(request):
try:
peer_name = request.data["name"]
tunnel_qr_file = "tunnel.png"
tunnel_conf_file = "tunnel.conf"
subject = "Tunnel configuration sent from wg-ui-plus"
subject = f"Tunnel configuration sent from wg-ui-plus for {peer_name}"
body = f"""
The attached files are sent from {APP_NAME}.
The attached files are sent from {APP_NAME} for the peer {peer_name}.
Keep them safe.
Notify the administrator if you think the files have been compromised.
Expand Down
2 changes: 1 addition & 1 deletion src/api_project/api_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", None)
EMAIL_PORT = os.environ.get("EMAIL_PORT", None)
EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL", None)
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_SSL", None)
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS", None)


LOGGING = {
Expand Down

0 comments on commit 154a20d

Please sign in to comment.