diff --git a/docs/my-website/docs/proxy/email.md b/docs/my-website/docs/proxy/email.md index a3f3a41694e..7849e4272d8 100644 --- a/docs/my-website/docs/proxy/email.md +++ b/docs/my-website/docs/proxy/email.md @@ -1,35 +1,75 @@ import Image from '@theme/IdealImage'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; # Email Notifications -Send an Email to your users when: -- A Proxy API Key is created for them -- Their API Key crosses it's Budget -- All Team members of a LiteLLM Team -> when the team crosses it's budget + +

+ LiteLLM Email Notifications +

- +## Overview -## Quick Start +Send LiteLLM Proxy users emails for specific events. + +| Category | Details | +|----------|---------| +| Supported Events | • User added as a user on LiteLLM Proxy
• Proxy API Key created for user | +| Supported Email Integrations | • Resend API
• SMTP | + +## Usage + +### 1. Configure email integration + + + Get SMTP credentials to set this up + +```yaml showLineNumbers title="proxy_config.yaml" +litellm_settings: + callbacks: ["smtp_email"] +``` + Add the following to your proxy env -```shell +```shell showLineNumbers SMTP_HOST="smtp.resend.com" +SMTP_TLS="True" +SMTP_PORT="587" SMTP_USERNAME="resend" -SMTP_PASSWORD="*******" -SMTP_SENDER_EMAIL="support@alerts.litellm.ai" # email to send alerts from: `support@alerts.litellm.ai` +SMTP_SENDER_EMAIL="notifications@alerts.litellm.ai" +SMTP_PASSWORD="xxxxx" ``` -Add `email` to your proxy config.yaml under `general_settings` + + -```yaml -general_settings: - master_key: sk-1234 - alerting: ["email"] +Add `resend_email` to your proxy config.yaml under `litellm_settings` + +set the following env variables + +```shell showLineNumbers +RESEND_API_KEY="re_1234" ``` -That's it ! start your proxy +```yaml showLineNumbers title="proxy_config.yaml" +litellm_settings: + callbacks: ["resend_email"] +``` + + + + +### 2. Create a new user + +On the LiteLLM Proxy UI, go to users > create a new user. + +After creating a new user, they will receive an email invite a the email you specified when creating the user. ## Customizing Email Branding diff --git a/docs/my-website/img/email_2.png b/docs/my-website/img/email_2.png new file mode 100644 index 00000000000..d686022824e Binary files /dev/null and b/docs/my-website/img/email_2.png differ diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index db3baeb2b20..f58f2cc0ac3 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -8,16 +8,3 @@ model_list: litellm_settings: callbacks: ["smtp_email"] -guardrails: - - guardrail_name: "bedrock-pre-guard" - litellm_params: - guardrail: bedrock # supported values: "aporia", "bedrock", "lakera" - mode: "pre_call" - guardrailIdentifier: wf0hkdb5x07f # your guardrail ID on bedrock - guardrailVersion: "DRAFT" # your guardrail version on bedrock - mask_request_content: true - mask_response_content: true - -general_settings: - store_model_in_db: true - store_prompts_in_spend_logs: true \ No newline at end of file