Compare commits

...

12 Commits

Author SHA1 Message Date
Piyush Gupta
9d1167ca80 Merge branch 'main' of https://github.com/formbricks/formbricks into feature/mail-from-name 2025-03-10 14:17:21 +05:30
Piyush Gupta
480fd8b729 fix: email_from_name default value 2025-03-10 14:15:40 +05:30
IllimarR
d294dfb9e8 Merge branch 'formbricks:main' into feature/mail-from-name 2025-03-05 10:58:25 +02:00
IllimarR
d8e286082a Update environment-variables.mdx, added MAIL_FROM_NAME 2025-03-03 22:37:26 +02:00
IllimarR
a8f42ff429 Update migration.mdx, added MAIL_FROM_NAME 2025-03-03 22:36:14 +02:00
IllimarR
133b4072bb Update .env.example, added MAIL_FROM_NAME 2025-03-03 22:35:29 +02:00
IllimarR
e8687ca854 Update turbo.json, added MAIL_FROM_NAME 2025-03-03 22:34:49 +02:00
IllimarR
714ff94c9b Update constants.ts, added MAIL_FROM_NAME 2025-03-03 22:33:56 +02:00
IllimarR
1a1ed296f8 Update smtp.mdx, added MAIL_FROM_NAME 2025-03-03 22:32:31 +02:00
IllimarR
4233321ee2 Update env.ts, added MAIL_FROM_NAME 2025-03-03 22:29:15 +02:00
IllimarR
9a75b7f145 Update formbricks.sh, added MAIL_FROM_NAME 2025-03-03 22:27:33 +02:00
IllimarR
717c092e2c Update index.tsx, added MAIL_FROM_NAME 2025-03-03 22:23:03 +02:00
17 changed files with 40 additions and 34 deletions

View File

@@ -39,6 +39,7 @@ DATABASE_URL='postgresql://postgres:postgres@localhost:5432/formbricks?schema=pu
# See optional configurations below if you want to disable these features.
MAIL_FROM=noreply@example.com
MAIL_FROM_NAME=Formbricks
SMTP_HOST=localhost
SMTP_PORT=1025
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
@@ -202,4 +203,4 @@ UNKEY_ROOT_KEY=
# AI_AZURE_LLM_DEPLOYMENT_ID=
# NEXT_PUBLIC_INTERCOM_APP_ID=
# INTERCOM_SECRET_KEY=
# INTERCOM_SECRET_KEY=

View File

@@ -6,6 +6,7 @@ import type SMTPTransport from "nodemailer/lib/smtp-transport";
import {
DEBUG,
MAIL_FROM,
MAIL_FROM_NAME,
SMTP_AUTHENTICATED,
SMTP_HOST,
SMTP_PASSWORD,
@@ -69,7 +70,7 @@ export const sendEmail = async (emailData: SendEmailDataProps): Promise<boolean>
} as SMTPTransport.Options);
const emailDefaults = {
from: `Formbricks <${MAIL_FROM ?? "noreply@formbricks.com"}>`,
from: `${MAIL_FROM_NAME ?? "Formbricks"} <${MAIL_FROM ?? "noreply@formbricks.com"}>`,
};
await transporter.sendMail({ ...emailDefaults, ...emailData });

View File

@@ -224,6 +224,9 @@ EOT
echo -n "Enter your SMTP configured Email ID: "
read mail_from
echo -n "Enter your SMTP configured Email Name: "
read mail_from_name
echo -n "Enter your SMTP Host URL: "
read smtp_host
@@ -244,6 +247,7 @@ EOT
else
mail_from=""
mail_from_name=""
smtp_host=""
smtp_port=""
smtp_user=""
@@ -270,6 +274,7 @@ EOT
if [[ -n $mail_from ]]; then
sed -i "s|# MAIL_FROM:|MAIL_FROM: \"$mail_from\"|" docker-compose.yml
sed -i "s|# MAIL_FROM_NAME:|MAIL_FROM_NAME: \"$mail_from_name\"|" docker-compose.yml
sed -i "s|# SMTP_HOST:|SMTP_HOST: \"$smtp_host\"|" docker-compose.yml
sed -i "s|# SMTP_PORT:|SMTP_PORT: \"$smtp_port\"|" docker-compose.yml
sed -i "s|# SMTP_SECURE_ENABLED:|SMTP_SECURE_ENABLED: $smtp_secure_enabled|" docker-compose.yml

View File

@@ -1039,6 +1039,7 @@ x-environment: &environment
# Email Configuration
MAIL_FROM:
MAIL_FROM_NAME:
SMTP_HOST:
SMTP_PORT:
SMTP_SECURE_ENABLED:

View File

@@ -33,6 +33,7 @@ These variables are present inside your machines docker-compose file. Restart
| RATE_LIMITING_DISABLED | Disables rate limiting if set to 1. | optional | |
| INVITE_DISABLED | Disables the ability for invited users to create an account if set to 1. | optional | |
| MAIL_FROM | Email address to send emails from. | optional (required if email services are to be enabled) | |
| MAIL_FROM_NAME | Email name/title to send emails from. | optional (required if email services are to be enabled) | |
| SMTP_HOST | Host URL of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_PORT | Host Port of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_USER | Username for your SMTP Server. | optional (required if email services are to be enabled) | |

View File

@@ -33,6 +33,7 @@ To enable email functionality, configure the following environment variables:
```bash
# Basic SMTP Configuration
MAIL_FROM=noreply@yourdomain.com
MAIL_FROM_NAME=Formbricks
SMTP_HOST=smtp.yourprovider.com
SMTP_PORT=587
SMTP_USER=your_username
@@ -75,6 +76,7 @@ If you're using the one-click setup with Docker Compose, you can either:
environment:
# Email Configuration
MAIL_FROM: noreply@yourdomain.com
MAIL_FROM_NAME: Formbricks
SMTP_HOST: smtp.yourprovider.com
SMTP_PORT: 587
SMTP_USER: your_username
@@ -95,6 +97,7 @@ environment:
```bash
MAIL_FROM=noreply@yourdomain.com
MAIL_FROM_NAME=Formbricks
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER=apikey
@@ -105,6 +108,7 @@ SMTP_PASSWORD=your_sendgrid_api_key
```bash
MAIL_FROM=noreply@yourdomain.com
MAIL_FROM_NAME=Formbricks
SMTP_HOST=email-smtp.us-east-1.amazonaws.com
SMTP_PORT=587
SMTP_USER=your_ses_access_key
@@ -115,6 +119,7 @@ SMTP_PASSWORD=your_ses_secret_key
```bash
MAIL_FROM=your_email@gmail.com
MAIL_FROM_NAME=Formbricks
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com

View File

@@ -83,6 +83,7 @@ export const SMTP_PASSWORD = env.SMTP_PASSWORD;
export const SMTP_AUTHENTICATED = env.SMTP_AUTHENTICATED !== "0";
export const SMTP_REJECT_UNAUTHORIZED_TLS = env.SMTP_REJECT_UNAUTHORIZED_TLS !== "0";
export const MAIL_FROM = env.MAIL_FROM;
export const MAIL_FROM_NAME = env.MAIL_FROM_NAME;
export const NEXTAUTH_SECRET = env.NEXTAUTH_SECRET;
export const ITEMS_PER_PAGE = 30;

View File

@@ -49,6 +49,7 @@ export const env = createEnv({
INTERCOM_SECRET_KEY: z.string().optional(),
IS_FORMBRICKS_CLOUD: z.enum(["1", "0"]).optional(),
MAIL_FROM: z.string().email().optional(),
MAIL_FROM_NAME: z.string().optional(),
NEXTAUTH_SECRET: z.string().min(1),
NOTION_OAUTH_CLIENT_ID: z.string().optional(),
NOTION_OAUTH_CLIENT_SECRET: z.string().optional(),
@@ -171,6 +172,7 @@ export const env = createEnv({
INTERCOM_SECRET_KEY: process.env.INTERCOM_SECRET_KEY,
IS_FORMBRICKS_CLOUD: process.env.IS_FORMBRICKS_CLOUD,
MAIL_FROM: process.env.MAIL_FROM,
MAIL_FROM_NAME: process.env.MAIL_FROM_NAME,
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
NEXT_PUBLIC_FORMBRICKS_API_HOST: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "Sobald alles eingerichtet ist, kannst Du deine Studie starten. Innerhalb weniger Stunden wirst Du die ersten Antworten erhalten.",
"how_to_embed_a_survey_on_your_react_native_app": "Wie man eine Umfrage in deine React Native App einbettet",
"how_to_embed_a_survey_on_your_web_app": "Wie man eine Umfrage in seine App einbettet",
"identify_users": "Benutzer identifizieren",
"identify_users_and_set_attributes": "Benutzer identifizieren und Attribute festlegen",
"identify_users_description": "Hast Du die E-Mail-Adresse oder eine Benutzer-ID? Füge sie der URL hinzu.",
"impressions": "Eindrücke",
"impressions_tooltip": "Anzahl der Aufrufe der Umfrage.",
"includes_all": "Beinhaltet alles",

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "Once everything is setup, you can launch your study. Within a few hours youll receive the first responses.",
"how_to_embed_a_survey_on_your_react_native_app": "How to embed a survey on your React Native app",
"how_to_embed_a_survey_on_your_web_app": "How to embed a survey on your web app",
"identify_users": "Identify users",
"identify_users_and_set_attributes": "identify users and set attributes",
"identify_users_description": "You have the email address or a userId? Append it to the URL.",
"impressions": "Impressions",
"impressions_tooltip": "Number of times the survey has been viewed.",
"includes_all": "Includes all",

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "Une fois que tout est configuré, vous pouvez lancer votre étude. Dans quelques heures, vous recevrez les premières réponses.",
"how_to_embed_a_survey_on_your_react_native_app": "Comment intégrer un sondage dans votre application React Native",
"how_to_embed_a_survey_on_your_web_app": "Comment intégrer une enquête dans votre application web",
"identify_users": "Identifier les utilisateurs",
"identify_users_and_set_attributes": "identifier les utilisateurs et définir des attributs",
"identify_users_description": "Avez-vous l'adresse e-mail ou un identifiant utilisateur ? Ajoutez-le à l'URL.",
"impressions": "Impressions",
"impressions_tooltip": "Nombre de fois que l'enquête a été consultée.",
"includes_all": "Comprend tous",

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "Depois que tudo estiver configurado, você pode iniciar seu estudo. Em algumas horas, você vai receber as primeiras respostas.",
"how_to_embed_a_survey_on_your_react_native_app": "Como incorporar uma pesquisa no seu app React Native",
"how_to_embed_a_survey_on_your_web_app": "Como incorporar uma pesquisa no seu app web",
"identify_users": "Identificar usuários",
"identify_users_and_set_attributes": "identificar usuários e definir atributos",
"identify_users_description": "Você tem o endereço de e-mail ou um userId? Adiciona isso ao URL.",
"impressions": "Impressões",
"impressions_tooltip": "Número de vezes que a pesquisa foi visualizada.",
"includes_all": "Inclui tudo",

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "Depois de tudo configurado, pode lançar o seu estudo. Dentro de algumas horas, receberá as primeiras respostas.",
"how_to_embed_a_survey_on_your_react_native_app": "Como incorporar um questionário na sua aplicação React Native",
"how_to_embed_a_survey_on_your_web_app": "Como incorporar um questionário na sua aplicação web",
"identify_users": "Identificar utilizadores",
"identify_users_and_set_attributes": "identificar utilizadores e definir atributos",
"identify_users_description": "Tem o endereço de email ou um userId? Adicione-o ao URL.",
"impressions": "Impressões",
"impressions_tooltip": "Número de vezes que o inquérito foi visualizado.",
"includes_all": "Inclui tudo",

View File

@@ -1750,9 +1750,7 @@
"how_to_create_a_panel_step_4_description": "設定完成後,您可以啟動您的研究。在幾個小時內,您就會收到第一個回應。",
"how_to_embed_a_survey_on_your_react_native_app": "如何在您的 React Native 應用程式中嵌入問卷",
"how_to_embed_a_survey_on_your_web_app": "如何在您的 Web 應用程式中嵌入問卷",
"identify_users": "識別使用者",
"identify_users_and_set_attributes": "識別使用者並設定屬性",
"identify_users_description": "您有電子郵件地址或使用者 ID 嗎?將其附加到網址。",
"impressions": "曝光數",
"impressions_tooltip": "問卷已檢視的次數。",
"includes_all": "包含全部",

View File

@@ -21,16 +21,16 @@ export const err = <E = Error>(error: E): ResultError<E> => ({
export interface ApiErrorResponse {
code:
| "not_found"
| "gone"
| "bad_request"
| "internal_server_error"
| "unauthorized"
| "method_not_allowed"
| "not_authenticated"
| "forbidden"
| "network_error"
| "too_many_requests";
| "not_found"
| "gone"
| "bad_request"
| "internal_server_error"
| "unauthorized"
| "method_not_allowed"
| "not_authenticated"
| "forbidden"
| "network_error"
| "too_many_requests";
message: string;
status: number;
url?: URL;

View File

@@ -121,16 +121,16 @@ export type { NetworkError, ForbiddenError };
export interface ApiErrorResponse {
code:
| "not_found"
| "gone"
| "bad_request"
| "internal_server_error"
| "unauthorized"
| "method_not_allowed"
| "not_authenticated"
| "forbidden"
| "network_error"
| "too_many_requests";
| "not_found"
| "gone"
| "bad_request"
| "internal_server_error"
| "unauthorized"
| "method_not_allowed"
| "not_authenticated"
| "forbidden"
| "network_error"
| "too_many_requests";
message: string;
status: number;
url?: URL;

View File

@@ -119,6 +119,7 @@
"IS_FORMBRICKS_CLOUD",
"INTERCOM_SECRET_KEY",
"MAIL_FROM",
"MAIL_FROM_NAME",
"NEXT_PUBLIC_LAYER_API_KEY",
"NEXT_PUBLIC_DOCSEARCH_APP_ID",
"NEXT_PUBLIC_DOCSEARCH_API_KEY",